Using extended asynchronous data mover indirect data address words

ABSTRACT

An abstraction for storage class memory is provided that hides the details of the implementation of storage class memory from a program, and provides a standard channel programming interface for performing certain actions, such as controlling movement of data between main storage and storage class memory or managing storage class memory.

BACKGROUND

One or more aspects of the present invention relate, in general, toauxiliary storage of a computing environment, and in particular, tomanaging aspects of auxiliary storage.

A computing environment may include main storage (a.k.a., main memory),as well as auxiliary storage. Main storage is storage accessible to aprocessor which is randomly addressable by, for instance, an absoluteaddress. Main storage is considered fast access storage compared toauxiliary storage, such as direct access storage devices (DASD) orstorage class memory. Further, the addressing of main storage isconsidered simpler than the addressing of DASD or storage class memory.

Storage class memory, which is an external storage space outside ofclassical main storage, provides faster access than direct accessstorage devices. Unlike DASD, storage class memory is not typicallyimplemented as mechanical-arm spinning disks, but instead,non-mechanical solid state parts. Typically, storage class memory isimplemented as groups of solid state devices connected to a computingsystem via several input/output (I/O) adapters, which are used to maptechnology of an I/O device to the memory bus of the central processingunit(s).

BRIEF SUMMARY

The shortcomings of the prior art are overcome and advantages areprovided through the provision of a computer program product forexecuting a Start Subchannel instruction in a computing environmentcomprising main storage and storage class memory. The computer programproduct includes a computer readable storage medium readable by aprocessing circuit and storing instructions for execution by theprocessing circuit for performing a method. The method includes, forinstance, responsive to determining that a subchannel identified by theStart Subchannel instruction is an Asynchronous Data Mover (ADM)subchannel, performing: obtaining an operation request block from mainstorage, the operation request block comprising an address of anoperation block; based on the address of the operation block, obtainingthe operation block from main storage, the operation block consisting ofa request block, a response block, and one or more move specificationblocks (MSBs), wherein the request block includes an MSB count fieldhaving a value indicating the number of one or more MSBs included in andreferenced by the operation block, wherein the response block isconfigured to hold exception conditions, wherein each move specificationblock is configured to include an operation code field, a block countfield, a main storage address field, a storage class memory addressfield, a block size field and a flags field; for each MSB block of theoperation block, obtaining a move specification block of the one or moremove specification blocks, and: determining based on the flags fieldthat the obtained move specification block is configured to obtain alist of one or more indirect data address words, the list of one or moreindirect data address words located at a first main storage address ofthe main storage address field of the obtained MSB; for each block ofdata specified by the obtained MSB, obtaining from the list of one ormore indirect data address words a second main storage address, whereina number of blocks and a block size are determined based on the blockcount field and the block size field of the obtained MSB; determiningbased on an operation code of the operation code field in the obtainedmove specification block that the obtained move specification block isconfigured to move blocks of data; and based on the obtained movespecification block, moving each block of data between the main storageand the storage class memory, wherein an address of a main storagelocation used for the move of a block of data is obtained using arespective second main storage address and an address of the storageclass memory used for the move is obtained using the storage classmemory address field.

Methods and systems relating to one or more aspects of the presentinvention are also described and claimed herein. Further, servicesrelating to one or more aspects of the present invention are alsodescribed and may be claimed herein.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

One or more aspects of the present invention are particularly pointedout and distinctly claimed as examples in the claims at the conclusionof the specification. The foregoing and other objects, features, andadvantages of the invention are apparent from the following detaileddescription taken in conjunction with the accompanying drawings inwhich:

FIG. 1A depicts one embodiment of a computing environment to incorporateand use one or more aspects of the present invention;

FIG. 1B depicts another embodiment of a computing environment toincorporate and use one or more aspects of the present invention;

FIG. 2A depicts one embodiment of an Extended Asynchronous Data Moveroperation request block used in accordance with an aspect of the presentinvention;

FIG. 2B depicts one embodiment of an Extended Asynchronous Data Moveroperation block used in accordance with an aspect of the presentinvention;

FIG. 2C depicts one embodiment of an Extended Asynchronous Data Moverrequest block used in accordance with an aspect of the presentinvention;

FIG. 2D depicts one embodiment of an Extended Asynchronous Data Moverresponse block used in accordance with an aspect of the presentinvention;

FIG. 2E depicts one embodiment of an Extended Asynchronous Data Movermove specification block used in accordance with an aspect of thepresent invention;

FIG. 2F depicts one embodiment of an Extended Asynchronous Data Moverindirect data address word used in accordance with an aspect of thepresent invention;

FIG. 3A depicts one embodiment of a Start Subchannel instruction used inaccordance with an aspect of the present invention;

FIG. 3B depicts one embodiment of the logic associated with the StartSubchannel instruction, in accordance with an aspect of the presentinvention;

FIG. 3C depicts one embodiment of a Clear Subchannel instruction used inaccordance with an aspect of the present invention;

FIG. 3D depicts one embodiment of a Test Subchannel instruction used inaccordance with an aspect of the present invention;

FIG. 3E depicts one embodiment of a Modify Subchannel instruction usedin accordance with an aspect of the present invention;

FIG. 3F depicts one embodiment of a Store Subchannel instruction used inaccordance with an aspect of the present invention;

FIG. 4A depicts one embodiment of an Extended Asynchronous Data Moversubchannel information block used in accordance with an aspect of thepresent invention;

FIG. 4B depicts one embodiment of an Extended Asynchronous Data Moverpath management control word used in accordance with an aspect of thepresent invention;

FIG. 4C depicts one embodiment of a subchannel status word used inaccordance with an aspect of the present invention;

FIG. 4D depicts one embodiment of an Extended Asynchronous Data Moverextended status word used in accordance with an aspect of the presentinvention;

FIG. 5A depicts one embodiment of a Store Storage Class MemoryInformation request block used in accordance with an aspect of thepresent invention;

FIG. 5B depicts one embodiment of a Store Storage Class MemoryInformation response block used in accordance with an aspect of thepresent invention;

FIG. 5C depicts one embodiment of a storage class memory address listentry used in accordance with an aspect of the present invention;

FIG. 5D depicts one embodiment of the logic associated with the StoreStorage Class Memory Information command, in accordance with an aspectof the present invention;

FIG. 6A depicts one example of a state diagram representing variousstates of storage class memory, in accordance with an aspect of thepresent invention;

FIG. 6B depicts one embodiment of a state diagram showing operationstates and data states, in accordance with an aspect of the presentinvention;

FIG. 7A depicts one embodiment of a Configure Storage Class Memoryrequest block used in accordance with an aspect of the presentinvention;

FIG. 7B depicts one embodiment of a Configure Storage Class Memoryresponse block used in accordance with an aspect of the presentinvention;

FIGS. 7C-7D depict one embodiment of the logic associated with aConfigure Storage Class Memory command used in accordance with an aspectof the present invention;

FIG. 8A depicts one example of a notification response block used inaccordance with an aspect of the present invention;

FIG. 8B depicts one embodiment of a Store Event Information requestblock used in accordance with an aspect of the present invention;

FIG. 8C depicts one embodiment of a Store Event Information responseblock used in accordance with an aspect of the present invention;

FIG. 9A depicts one embodiment of a Deconfigure Storage Class Memoryrequest block used in accordance with an aspect of the presentinvention;

FIG. 9B depicts one embodiment of a storage class memory incrementrequest list entry used in accordance with an aspect of the presentinvention;

FIG. 9C depicts one embodiment of a Deconfigure Storage Class Memoryresponse block used in accordance with an aspect of the presentinvention;

FIGS. 9D-9E depict one embodiment of the logic associated with aDeconfigure Storage Class Memory command used in accordance with anaspect of the present invention;

FIG. 10 depicts one embodiment of a computer program productincorporating one or more aspects of the present invention;

FIG. 11 depicts one embodiment of a host computer system to incorporateand use one or more aspects of the present invention;

FIG. 12 depicts a further example of a computer system to incorporateand use one or more aspects of the present invention;

FIG. 13 depicts another example of a computer system comprising acomputer network to incorporate and use one or more aspects of thepresent invention;

FIG. 14 depicts one embodiment of various elements of a computer systemto incorporate and use one or more aspects of the present invention;

FIG. 15A depicts one embodiment of the execution unit of the computersystem of FIG. 14 to incorporate and use one or more aspects of thepresent invention;

FIG. 15B depicts one embodiment of the branch unit of the computersystem of FIG. 14 to incorporate and use one or more aspects of thepresent invention;

FIG. 15C depicts one embodiment of the load/store unit of the computersystem of FIG. 14 to incorporate and use one or more aspects of thepresent invention; and

FIG. 16 depicts one embodiment of an emulated host computer system toincorporate and use one or more aspects of the present invention.

DETAILED DESCRIPTION

In accordance with one or more embodiments, an abstraction for storageclass memory is provided that hides the details of the implementation ofstorage class memory from a program (e.g., operating system), andprovides a standard channel programming interface for performing certainactions, such as controlling movement of data between main storage andstorage class memory.

In one example, a facility is provided, referred to as an ExtendedAsynchronous Data Mover (EADM) Facility, which allows programs torequest the transfer of blocks of data between main storage and storageclass memory, as well as request other operations. Aspects of thisfacility are described in detail below.

Further, associated with the EADM Facility is an optional facilityreferred to as an EADM Release Facility. When installed, the EADMRelease Facility provides a means for the program to specify that it nolonger requires the retention of the data in one or more blocks ofstorage class memory. It is model dependent whether the releaseoperation is supported for all blocks of storage class memory or foronly a subset of the storage class memory.

Once a block of storage class memory has been released, the program maytransfer new data into the block, otherwise subsequent requests totransfer data from the block to main storage will be unsuccessful.

One embodiment of a computing environment to incorporate and/or use oneor more aspects of the present invention is described with reference toFIG. 1A. Computing environment 100 is based, for instance, on thez/Architecture® offered by International Business Machines Corporation(IBM®), Armonk, N.Y. An embodiment of the z/Architecture® is describedin an IBM® publication entitled “z/Architecture Principles ofOperation,” IBM Publication No. SA22-7832-08, August 2010, which ishereby incorporated herein by reference in its entirety. In one example,a computing environment based on the z/Architecture® includes thezEnterprise 196 (z196) system offered by International Business MachinesCorporation. IBM® and z/Architecture® are registered trademarks, andzEnterprise 196 and z196 are trademarks of International BusinessMachines Corporation, Armonk, N.Y., USA. Other names used herein may beregistered trademarks, trademarks or product names of InternationalBusiness Machines Corporation or other companies.

As one example, computing environment 100 includes one or more centralprocessing units 102 coupled to main memory 104 via one or more buses106. One or more of the central processing units may execute anoperating system 108, such as the z/OS® operating system offered byInternational Business Machines Corporation. In other examples, one ormore of the central processing units may execute other operating systemsor no operating system. z/OS® is a registered trademark of InternationalBusiness Machines Corporation, Armonk, N.Y., USA.

Central processing units 102 and main memory 104 may be further coupledto an I/O hub 120 via one or more connections 122 (e.g., buses or otherconnections). The I/O hub provides connectivity to one or more I/Oadapters 130, which are further coupled to one or more solid statedevices 140. The adapters and solid state devices are an implementationof storage class memory (e.g., flash memory). The I/O hub is part of anI/O subsystem 145 facilitating one or more aspects of an embodiment.

In a further embodiment, as depicted in FIG. 1B, a computing environment150 may include a central processing complex (CPC) 152, which is basedon the z/Architecture® offered by International Business MachinesCorporation. Central processor complex 152 includes, for instance, oneor more partitions 154, a hypervisor 156, one or more central processors158, and one or more components of an input/output subsystem 160. Inthis example, partitions 154 are logical partitions (e.g., LPARs), eachof which includes a set of the system's hardware resources, virtualizedas a separate system.

Each logical partition 154 is capable of functioning as a separatesystem. That is, each logical partition can be independently reset,initially loaded with an operating system or other control code, ifdesired, and operate with different programs. An operating system orapplication program running in a logical partition appears to haveaccess to a full and complete system, but in reality, only a portion ofit is available. A combination of hardware and licensed internal code(LIC), referred to as firmware, keeps a program in one logical partitionfrom interfering with a program in a different logical partition. Thisallows several different logical partitions to operate on a single ormultiple physical processors in a time-slice manner. As used herein,firmware includes, e.g., the microcode, millicode and/or macrocode ofthe processor (or entity performing the processing). It includes, forinstance, the hardware-level instructions and/or data structures used inimplementation of higher level machine code. In one embodiment, itincludes, for instance, proprietary code that is typically delivered asmicrocode that includes trusted software or microcode specific to theunderlying hardware and controls operating system access to the systemhardware.

In this example, several of the logical partitions have a residentoperating system (OS) 170, which may differ for one or more logicalpartitions. In one embodiment, at least one logical partition isexecuting the z/OS® operating system, offered by International BusinessMachines Corporation, Armonk, N.Y.

Logical partitions 154 are managed by hypervisor 156, which isimplemented by firmware running on central processors 158. Logicalpartitions 154 and hypervisor 156 each comprises one or more programsresiding in respective portions of main memory 159 associated with thecentral processors. One example of hypervisor 156 is the ProcessorResource/Systems Manager (PR/SM™), offered by International BusinessMachines Corporation, Armonk, N.Y.

Central processors 158 are physical processor resources that areallocated to the logical partitions. For instance, a logical partition154 includes one or more logical processors, each of which representsall or a share of a physical processor resource 158 allocated to thepartition. The logical processors of a particular partition 154 may beeither dedicated to the partition, so that the underlying processorresource is reserved for that partition; or shared with anotherpartition, so that the underlying processor resource is potentiallyavailable to another partition.

Input/output subsystem 160 (of which only a portion is depicted)provides connectivity to storage class memory 180. In this example, anaddress space is provided for the storage class memory which presentsthe memory as flat, hiding the details of the physical implementationfrom the program. As one example, there is one address space system-widefor the storage class memory, but from the view of a configuration(e.g., LPAR or in another embodiment, a virtualized guest) there is oneaddress space into which storage class memory increments are populatedfor each configuration of the system. The storage class memory addressspace is separate and apart from the main storage address space.

In one particular example of the z/Architecture®, the I/O subsystemincludes a channel subsystem, which, not only directs the flow ofinformation between I/O peripheral control units (and devices) and mainmemory, but also between the storage class memory and main memory.However, the I/O subsystem may be other than a channel subsystem.

In the case of a channel subsystem, subchannels are used to perform EADMoperations. These subchannels are referred to as Asynchronous Data Mover(ADM)-type subchannels and are associated with EADM operations, and notI/O devices, like other I/O-type subchannels. An ADM-type subchanneldoes not contain a device number, nor does it contain channel pathinformation. The number of ADM-type subchannels provided for aconfiguration is model dependent. ADM-type subchannels are addressed bya subsystem identification word (SID).

The ADM-type subchannels are used by the Extended Asynchronous DataMover Facility, which is an extension to the channel subsystem. Asdescribed herein, the EADM Facility allows a program to request thetransfer of blocks of data between main storage and storage classmemory, as well as perform other operations, such as clear a block ofstorage class memory or release a block of storage class memory. In oneembodiment, when the EADM Facility is installed:

-   -   One or more ADM-type subchannels are provided which are used for        EADM operations.    -   EADM operations are designated by a specified EADM-operation        block (AOB). The AOB includes an EADM-request block (ARQB) and        an EADM-response block (ARSB), and designates a list of EADM        move-specification blocks (MSBs). For a move operation, the MSBs        contain information about the blocks of data to be moved, such        as the size of the blocks, the source and destination locations        of the blocks, and the direction of the data movement.    -   The maximum number of MSBs that may be specified by an AOB is        model dependent. The maximum count of blocks that an MSB may        specify to be moved or operated on is also model dependent.    -   A program initiates EADM operations by issuing a Start        Subchannel instruction that designates an ADM-type subchannel        and an EADM operation request block (ORB). In turn, the EADM ORB        designates an AOB. The instruction passes the contents of the        EADM ORB to the designated subchannel.    -   When Start Subchannel is issued to initiate EADM operations, the        channel subsystem asynchronously performs the specified        operation.    -   As observed by the program, storage class memory appears to be        block concurrent at a model dependent minimum block size. This        model dependent value is called the SCM block concurrency size.    -   When EADM operations are complete, an I/O interruption is made        pending to the program for the ADM-type subchannel on which the        operations were initiated.

The EADM ORB includes the specification of a subchannel key and theaddress of the AOB to be used. The AOB is designated, for instance, on a4 K-byte boundary and may be up to 4 K-byte in size. If more MSBs areneeded than fit into a 4 K-byte AOB, the AOB may specify an MSB listthat is extended into additional storage areas by using MSBs thatdesignate the address of the next MSB in the list, instead ofdesignating a storage area to be used for data transfer.

The first EADM operation is started by the channel subsystem usinginformation in the designated EADM ORB and ARQB in the designated AOB tofetch an MSB. The MSB includes the information that specifies andcontrols the EADM operation to be processed.

Each EADM operation is represented by one MSB. An MSB may specify, forinstance, a transfer of blocks of data from main storage to storageclass memory; a transfer of blocks of data from storage class memory tomain storage; a clearing of blocks of storage class memory; and thereleasing of blocks of storage class memory.

If the blocks of storage to be transferred are not contiguous in mainstorage, a new MSB may be used or the MSB may use indirect addressing byspecifying a list of EADM indirect data address words (AIDAWs) todesignate the noncontiguous blocks.

Since an MSB specifies the transfer of data in only one direction, a newMSB is to be used when there is a change in the direction of thetransfer.

The conclusion of an EADM operation is normally indicated by thecombined status conditions of channel end and device end. This statuscombination represents the combination of primary and secondary statusindicating that the subchannel is available for another start functionafter the status is cleared.

An EADM operation may be terminated prematurely by a Clear Subchannelinstruction. Execution of the Clear Subchannel instruction terminatesexecution of the AOB at the subchannel, clears the subchannel ofindications of the AOB in execution, and asynchronously performs theclear function.

Further details regarding the EADM ORB and related control structuresare described below with reference to FIGS. 2A-2F. Initially, referringto FIG. 2A, one embodiment of an EADM ORB is described.

As one example, an EADM ORB 200 includes:

-   -   Interruption Parameter 202: This field is preserved unmodified        in the subchannel until replaced by a subsequent Modify        Subchannel or Start Subchannel instruction. These bits are        placed in the I/O interruption code when an I/O interruption        occurs for the subchannel and when an interruption request is        cleared by the execution of, for instance, a Test Pending        Interruption.    -   Subchannel Key 204: This field forms the subchannel key for the        EADM operations specified by the ARQB and applies to fetching of        the ARQB, fetching MSBs, storing of the ARSB, and for accessing        main storage for data transfer. The value of this field is a        defined value; otherwise, either a program check condition is        recognized by the channel subsystem or an operand exception is        recognized.    -   ORB Extension Control (X) 205: This field specifies whether the        ORB is extended. This field is a specified value when an        ADM-type subchannel is designated; otherwise, either an operand        exception or a program check condition is recognized.    -   EADM Operation Block (AOB) Address 206: This field specifies an        address of the EADM operation block (AOB). If certain bits of        this field do not include a defined value, then either an        operand exception or a program check condition is recognized.    -   If this field designates a location protected against fetching        or designates a location outside of the configuration, the start        function is not initiated. In this case, the subchannel becomes        status pending with primary, secondary and alert status.    -   Channel Subsystem (CSS) Priority 208: This field includes a        channel subsystem priority number that is assigned to the        designated subchannel and used to order the selection of        ADM-type subchannels when a start function is to be initiated        for one or more subchannels that are start pending.    -   Storage Class Memory (SCM) Priority 210: This field includes a        storage class memory priority (SCM) number that specifies the        priority level that is applied to all EADM operations associated        with the start function.    -   It is model dependent whether the contents of SCM priority field        are recognized by the EADM Facility. On models that do not        recognize this field, the field contents are ignored and all        EADM operations associated with the start function are assigned        an implicit priority number.    -   Format (FMT) 212: This field specifies the layout of the ORB.        This field is to include a specified value when an ADM-type        subchannel is designated; otherwise, an operand exception is        recognized or a particular condition code is set.

The EADM operation block (AOB) specified by EADM AOB address 206 of theEADM ORB includes the information used to invoke EADM operations. An AOBis allocated, in one example, on a 4K-byte boundary and is variable inlength.

In one example, as shown in FIG. 2B, an EADM AOB 220 includes threesections: an EADM request block (ARQB) 222; an EADM response block(ARSB) 224; and an MSB area 226 containing up to a defined number (e.g.,124) of MSBs. The ARQB may specify the use of more than the definedMSBs, however, when using MSB branching (that is, by using the branch tonext MSB flag in the MSB).

One embodiment of an EADM request block (ARQB) 222 is described withreference to FIG. 2C. In one example, ARQB 222 includes:

-   -   Format (FMT) 230: This field specifies the layout of ARQB. The        value of this field is a defined value; otherwise, a program        check condition is recognized by the channel subsystem and a        command code error is indicated in the exception qualifier code        field of the ARSB.    -   Command Code 232: This field is to specify the EADM move blocks        command; otherwise, a program check condition is recognized by        the channel subsystem and a command code error is indicated in        the exception qualifier code field of the ARSB.    -   MSB Count 234: This field specifies a count of MSBs that compose        the EADM request. The maximum count of MSBs that may be        specified is model dependent. The value of this field is to be        greater than zero and less than or equal to the model dependent        maximum MSB count value; otherwise, a program check condition is        recognized by the channel subsystem and an MSB count error is        indicated in the exception qualifier code field of the ARSB.

In addition to the EADM request block, the EADM ORB also specifies anEADM response block (ARSB). The EADM response block is meaningful, inthis embodiment, only when an exception condition is recognized.Specifically, an ARSB is meaningful only when alert status is present inthe EADM subchannel status word (SCSW), the EADM extended status word(ESW) is meaningful, and the EADM response block stored (R) bit is onein the EADM extended report word (ERW), each of which is describedbelow. When an ARSB is not meaningful, the contents of the ARSB in theAOB are unpredictable.

If a program stores into the ARSB while the associated subchannel issubchannel active, unpredictable results may occur.

When an ARSB is stored, the amount of data that has been transferred, ifany, is unpredictable.

One embodiment of an EADM response block is described with reference toFIG. 2D. In one example, ARSB 224 includes:

-   -   Format (FMT) 240: This field specifies the layout of the ARSB.        When an ARSB is stored, the value of this field is stored as a        defined value.    -   Exception Flags (EF) 242: When an ARSB is stored, this field,        when set, specifies the exception reason for which the ARSB is        stored. Example exception reasons include:        -   Program check: A programming error is detected.        -   Protection check: A storage access is prevented by the            protection mechanism. Protection applies to the fetching of            the ARQB, MSB, AIDAWs, and data to be transferred to storage            class memory, and to the storing of information in the ARSB            and data transferred from storage class memory.        -   Channel data check: An uncorrected storage error has been            detected in regard to data that is contained in main storage            and is currently used in the performance of an EADM            operation. The condition may be indicated when detected,            even if the data is not used when prefetched. Channel data            check is indicated when data or the associated key has an            invalid checking block code (CBC) in main storage when that            data is referenced by the channel subsystem.        -   Channel control check: Channel control check is caused by            any machine malfunction affecting channel subsystem            controls. The condition includes invalid CBC on an ARQB, an            ARSB, an MSB, an AIDAW, or the respective associated key.            The condition may be indicated when an invalid CBC is            detected on a prefetched ARQB, MSB, AIDAW or the respective            associated key, even if that ARQB, MSB, or AIDAW is not            used.        -   Extended asynchronous data move facility check: An            uncorrected error has been detected in regard to data that            is contained in storage class memory and is currently used            in the performance of an EADM operation.    -   Exception Control Block Identifiers (ECBI) 244: When an ARSB is        stored, this field is a multiple bit mask whose bits, when set,        specify any single or combination of the following components        that are associated with the recognized exception designated by        the EF field:        -   The control block or blocks.        -   The main storage data area.        -   The storage class memory.    -   The bits that can be set represent, for instance, an EADM move        specification block, an EADM indirect data address, data in main        storage, and/or data in storage class memory.    -   The bits in the ECBI field describe the components associated        with a single exception condition. If no components can be        identified for the exception condition, this field contains, for        instance, zeros.    -   Field Validity Flag (FVF) 246: When an ARSB is stored, this        field includes a multiple bit mask whose bits indicate the        validity of certain fields in the ARSB. When a validity bit is        set, the corresponding field has been stored and is usable for        recovery purposes. The bits that can be set represent, for        instance, failing MSB address field, failing AIDAW field,        failing main storage address field, and/or failing storage class        memory address field.    -   Exception Qualifier Code (EQC) 248: When an ARSB is stored, this        field includes a code value that further describes the exception        specified by the exception flags field. Code values may        represent the following, as examples:        -   No additional description is provided. For this case, the            exception control block identifiers (ECBI) field and those            fields validated by the field validity flags field may            identify the control blocks for which the exception is            recognized.        -   Format Error: The format specified by the format field is            reserved. For this case, the exception control block            identifiers (ECBI) field and those fields validated by the            field validity flags field may identify the control blocks            for which the exception is recognized.        -   Command code error: The value specified in the command code            field of the ARQB is not recognized.        -   MSB count error: The value specified in the MSB count field            of the ARQB is zero or exceeds the model dependent maximum            of MSBs that may be specified.        -   Flags error: Flag bits specified by the flags field are            reserved. For this case, the exception control block            identifiers (ECBI) field and those fields validated by the            field validity flags field may identify the control blocks            for which the exception is recognized        -   Operation code error: A reserved operation code value is            specified. If the field validity flags field indicates that            the failing MSB address field is valid, the field contains            the address of the MSB for which the exception is            recognized.        -   Block size error: A reserved block size value is specified.            If the field validity flags field indicates that the failing            MSB address field is valid, the field contains the address            of the MSB for which the exception is recognized        -   Block count error: The value specified in the block count            field of an MSB is zero or exceeds the model dependent            maximum count of blocks that may be specified by an MSB. If            the field validity flags field indicates that the failing            MSB address field is valid, the field contains the address            of the MSB for which the exception is recognized        -   Main storage address specification error: A main storage            address is specified on an incorrect boundary. Such an            address could have been designated by an MSB or by an AIDAW.            If the field validity flags field indicates that the failing            MSB address field is valid, the field contains the address            of the MSB for which the exception is recognized. If the            field validity flags field indicates that the failing AIDAW            address field is valid, the field contains the address of            the AIDAW for which the exception is recognized. If the            field validity flags field indicates that the failing main            storage address field is valid, the field contains the main            storage address for which the exception is recognized.        -   Storage class memory address specification error: A storage            class memory address is specified on an incorrect boundary.            Such an address is designated by an MSB. If the field            validity flags indicates that the failing MSB address field            is valid, the field contains the address of the MSB for            which the exception is recognized. If the field validity            flags field indicates that the failing AIDAW address field            is valid, the field contains the address of the AIDAW for            which the exception is recognized. If the field validity            flags field indicates that the failing storage class memory            address field is valid, the field contains the storage class            memory address for which the exception is recognized.        -   Main storage address exception: The EADM facility attempted            to use an address that is not available in the configuration            or wrapped the maximum storage address. Such an address            could have been designated by an MSB or resulted from            incrementing main storage addresses during data transfer. If            the field validity flags field indicates that the failing            MSB address field is valid, the field contains the address            of the MSB for which the exception is recognized. If the            field validity flags field indicates that the failing AIDAW            address field is valid, the field contains the address of            the AIDAW for which the exception is recognized. If the            field validity flags field indicates that the failing main            storage address field is valid, the field contains the main            storage address for which the exception is recognized.        -   Storage class memory address exception: The EADM facility            attempted to use a storage class memory address that is            unavailable in the configuration. Such an address could have            been designated by an MSB or resulted from incrementing            storage class memory addresses during data transfer. If the            field validity flags field indicates that the failing MSB            address field is valid, the field contains the address of            the MSB for which the exception is recognized. If the field            validity flags field indicates that the failing AIDAW            address field is valid, the field contains the address of            the AIDAW for which the exception is recognized. If the            field validity flags field indicates that the failing            storage class memory address field is valid, the field            contains the storage class memory address for which the            exception is recognized.        -   Main storage error: An uncorrected main storage error is            detected. If the field validity flags field indicates that            the failing MSB address field is valid, the field contains            the address of the MSB for which the exception is            recognized. If the field validity flags field indicates that            the failing AIDAW address field is valid, the field contains            the address of the AIDAW for which the exception is            recognized. If the field validity flags field indicates that            the failing main storage address field is valid, the field            contains the main storage address for which the exception is            recognized.        -   MSB list error: The AOB specifies an MSB list which crosses            a 4K byte boundary without specifying branch-to-next MSB            (BNM) to cross the boundary or the MSB is the last MSB in            the specified MSB list and BNM is specified by the MSB. If            the field validity flags field indicates that the failing            MSB address field is valid, the field contains the address            of the MSB for which the exception is recognized.        -   MSB branch error: The AOB specifies an MSB list in which an            MSB (branch-source MSB) specifies a branch-to-next MSB (BNM)            and the MSB that is the branch target also specifies BNM. If            the field validity flags field indicates that the failing            MSB address field is valid, the field contains the address            of the branch source MSB for which the exception is            recognized.        -   AIDAW list error: An MSB specifies an EADM indirect data            address word (AIDAW) list which crosses a 4K byte boundary            without specifying branch-to-next AIDAW (BNA) to cross the            boundary. If the field validity flags field indicates that            the failing MSB address field is valid, the field contains            the address of the MSB for which the exception is            recognized. If the field validity flags field indicates that            the failing AIDAW address field is valid, the field contains            the address of the AIDAW for which the exception is            recognized.        -   AIDAW branch error: An MSB specifies an EADM indirect data            address word (AIDAW) list in which an AIDAW (branch source            AIDAW) specifies a branch-to-source AIDAW (BNA) and the            AIDAW that is the branch target also specifies BNA. If the            field validity flags field indicates that the failing MSB            address field is valid, the field contains the address of            the MSB for which the exception is recognized. If the field            validity flags field indicates that the failing AIDAW            address field is valid, the field contains the address of            the branch-source AIDAW for which the exception is            recognized        -   Storage class memory temporary error: A recoverable storage            class memory error is detected. If the field validity flag            field indicates that the failing MSB address field is valid,            the field contains the address of the MSB for which the            exception is recognized. If the field validity flags field            indicates that the failing AIDAW address field is valid, the            field contains the address of the AIDAW for which the            exception is recognized. If the field validity flags field            indicates that the failing storage class memory address            field is valid, the field contains the storage class memory            address for which the exception is recognized.        -   Release operation not supported error: A release operation            was specified for storage class memory for which the release            operation is not supported. If the field validity flags            field indicates that the failing MSB address field is valid,            the field contains the address of the MSB for which the            exception is recognized. If the field validity flags field            indicates that the failing AIDAW address field is valid, the            field contains the address of the AIDAW for which the            exception is recognized. If the field validity flags field            indicates that the failing storage class memory address            field is valid, the field contains the storage class memory            address for which the exception is recognized.        -   Released data read error: A read operation was specified for            storage class memory for which the last successful operation            was a release operation. If the field validity flags field            indicates that the failing MSB address field is valid, the            field contains the address of the MSB for which the            exception is recognized. If the field validity flags field            indicates that the failing AIDAW address field is valid, the            field contains the address of the AIDAW for which the            exception is recognized. If the field validity flags field            indicates that the failing storage class memory address            field is valid, the field contains the storage class memory            address for which the exception is recognized.    -   Failing MSB Address 250: When a specified bit of the field        validity flags field is set, this field indicates an address of        the MSB for which an exception is recognized.    -   Failing AIDAW Address 252: When a specified bit of the field        validity flags field is set, this field indicates an address of        the AIDAW for which an exception is recognized    -   Failing Main Storage Address 254: When a specified bit of the        field validity flags field is set, this field indicates an        address of the block of main storage for which an exception is        recognized.    -   Failing Storage Class Memory Address 256: When a specified bit        of the field validity flags field is set, this field includes        the (e.g., 64 bit) SCM address of the block of storage class        memory for which an exception is recognized.

In addition to the EADM request block and EADM response block, the EADMoperation block (AOB) also specifies one or more EADM move specificationblocks (MSBs). The AOB may contain up to, for instance, 124 MSBs.However, the program may specify more than 124 MSBs by designating alarger number of MSBs in the count field of the ARQB and by using thebranch-to-next-MSB (BNM) flag to branch to a continuation of the MSBlist. There may be multiple continuations of the MSB list, but, in oneembodiment, none of these continuations may cross a 4K-byte boundarywithout using BNM to cross that boundary. Continuations of the MSB listare not required to be contiguous. Each continuation of the MSB list, ifdesignated to begin on a 4K-byte boundary, may contain up to 128 MSBs.The total number of MSBs in an MSB list is specified by the MSB countfield in the ARQB.

An EADM move specification block describes, for instance, the blocks ofstorage to be moved between main storage and storage class memory or anoperation to be performed on a block of storage. One embodiment of MSB226 is described with reference to FIG. 2E, and includes, for instance:

-   -   Format (FMT) 260: This field specifies the layout of the MSB.        The value of this field is a defined value; otherwise, an MSB        format error is indicated in the exception qualifier code field        of the ARSB.    -   Operation Code (OC) 262: This field specifies the operation to        be performed. In one example, when a specified bit of the flags        field, described below, is a defined value, this field specifies        the operation to be performed. Example operations include:        -   Clear storage class memory: When this code is designated,            the storage class memory specified by the storage class            memory address, block size, and block count field is cleared            (e.g., set to zeros). The main storage address field has no            meaning for this operation.        -   Read: When this code is designated, data is specified to be            transferred from storage class memory to main storage. The            block count, block size, main storage address and storage            class memory address fields have meaning for this operation.        -   Write: When this code is designated, data is specified to be            transferred from main storage to storage class memory. The            block count, block size, main storage address, and storage            class memory address fields have meaning for this operation.        -   Release: When this code is designated and the EADM Release            Facility is installed, the storage class memory specified by            the storage class memory address, block size, and block            count fields is released. The main storage address field has            no meaning for this operation. When the EADM Release            Facility is not installed, this code is reserved.    -   If a reserved value is specified, a program check condition is        recognized by the channel subsystem and an operation code error        is indicated in the exception qualifier code field of the ARSB.    -   When the specified flag bit of the flag field is not the defined        value, this field is reserved and not checked.    -   Flags 264: This field identifies one or more flags that may be        set. Flag bits that are reserved are set to a defined value;        otherwise a flags error is indicated in the exception qualifier        code field of the ARSB. Example flags include:        -   Branch to next MSB (BNM): When set, this flag indicates that            the MSB does not specify an EADM operation and is not used            to transfer data. Instead, the main storage address field            specifies the address of the next MSB to be used to specify            an EADM operation.        -   When the BNM flag is set (e.g., one) and the main storage            address field specifies an MSB in which the BNM flag is also            set, a program check condition is recognized by the channel            subsystem, the address of the branch source MSB is stored in            the failing MSB address field of the ARSB, and an MSB branch            error is indicated in the exception qualifier code field of            the ARSB.        -   If an MSB ends at a 4K-byte boundary, the AOB specifies            additional MSBs, and the BNM flag is not set, a program            check condition is recognized by the channel subsystem, the            address of the MSB is stored in the failing MSB address            field of the ARSB, and an MSB list error is indicated in the            exception qualifier code field of the ARSB.        -   If an MSB is the last MSB in the specified MSB list and the            BNM flag is set, a program check condition is recognized by            the channel subsystem, the address of the MSB is stored in            the failing MSB address field of the ARSB, and an MSB list            error is indicated in the exception qualifier code field of            the ARSB.        -   When the BNM flag is set, the remaining flags, the operation            code field, the block size field, the block set count field,            and the storage class memory address have no meaning.        -   Indirect addressing: When set, this flag indicates that the            main storage address field designates an address of an EADM            indirect data address word (AIDAW) or of the first AIDAW of            a list of AIDAWs that designates the main storage location            or locations, respectively, to be used for data transfer.            When not set, this flag indicates that the main storage            address field designates an address of the main storage            location to be used for data transfer.    -   Block Size (BS) 266: This field specifies the size and boundary        of the data blocks to be transferred for both main storage and        storage class memory, or the size and boundary of a block of        storage class memory to be operated on (e.g., cleared or        released). Examples include:        -   4K: When the code value is one defined value, the data            blocks to be transferred are on a 4K-byte boundary and are            4K-byte in size.        -   1M: When the code value is another defined value, the data            blocks to be transferred are on a 1M-byte boundary and are            1M-byte in size.        -   If a reserved value is specified, a program check condition            is recognized by the channel subsystem and a block size            error is indicated in the exception qualifier code field of            the ARSB.        -   When the BNM flag is set, this field is ignored.    -   Block Count 268: This field includes a count of blocks of data        to be transferred or operated on (e.g., cleared or released).        Based on the block size field, this is the count of either        4K-byte or 1M-byte blocks.    -   The value of this field is to be greater than zero and less than        or equal to the model dependent maximum block count that can be        specified by an MSB; otherwise, a program check condition is        recognized by the channel subsystem and a block count error is        indicated in the exception qualifier code field of the ARSB.    -   When the BNM flag is set, this field is reserved and not        checked.    -   Main Storage Address 270: When the operation code field has        meaning (e.g., the BNM flag is not set) and specifies either a        read or a write operation, and the indirect addressing indicator        in the flags field is not set, this field includes a main        storage address to be used for data transfer and the following        apply:        -   When the block-size field specifies 4K-byte blocks,            specified bits of this field contain a defined value (e.g.,            zero); otherwise, a program check condition is recognized by            the channel subsystem and a main storage specification error            is indicated in the exception qualifier code field of the            ARSB.        -   When the block size field specifies 1M-byte blocks,            specified bits of this field contain a defined value (e.g.,            zeros); otherwise, a program check condition is recognized            by the channel subsystem and a main storage specification            error is indicated in the exception qualifier code field of            the ARSB.    -   When the operation code field has meaning and specifies either a        read or a write operation and the indirect addressing indicator        in the flags field is set, the field includes a main storage        address of an AIDAW or the first of a list of AIDAWs to be used        for data transfer. For this case, certain bits of this field        contain a defined value; otherwise, a program check condition is        recognized by the channel subsystem and a main storage        specification error is indicated in the exception qualifier code        field of the ARSB.    -   When the BNM flag is set, the operation code does not have        meaning and the MSB does not specify an EADM operation. Instead,        this field includes a main storage address of the next MSB that        specifies an EADM operation. For this case, specified bits of        this field contain a defined value; otherwise, a program check        condition is recognized by the channel subsystem and a main        storage specification error is indicated in the exception        qualifier code field of the ARSB.    -   Storage Class Memory Address 272: When the operation code field        has meaning, this field includes the (e.g., 64 bit) storage        class memory address to be used for the data transfer or to be        operated on (e.g., clear, release) and the following apply:        -   When the block size field specifies 4K-byte blocks,            specified bits of this field contain a defined value (e.g.,            zeros); otherwise, a program check condition is recognized            by the channel subsystem and a storage class memory            specification error is indicated in the exception qualifier            code field of the ARSB.        -   When the block size field specifies 1M-byte blocks,            specified bits of this field contain a defined value;            otherwise, a program check condition is recognized by the            channel subsystem and a storage class memory specification            error is indicated in the exception qualifier code field of            the ARSB.    -   When the BNM flag is set, this field is reserved and not        checked.

As indicated above, an EADM indirect data address word may be specified.The EADM indirect data address word (AIDAW) allows the program tospecify the transfer of blocks of data between storage class memory andnon-contiguous blocks of main storage. An AIDAW or list of AIDAWs isdesignated by an MSB when the indirect addressing flag in the MSB isset.

The amount of data transferred by a single AIDAW is specified by theblock size field in the MSB. The number of AIDAWs in an AIDAW list isthe sum of the number specified by the block count field in the MSB plusthe number of AIDAWs that specify branch-to-next-AIDAW. Data transfersmay be processed in orders that are different from that specified in anAIDAW list. Furthermore, data transfers specified by multiple AIDAWs inan AIDAW list may be processed concurrently.

An AIDAW is allocated on, for instance, a quadword boundary. A list ofAIDAWs may be any length, but in one example, are not to cross a 4K-byteboundary unless a branch to next AIDAW (BNA) is specified to cross theboundary. There is no requirement that the AIDAW that is the target of abranch be contiguous with the AIDAW specifying BNA. However, the programshould create an AIDAW list in as few 4K-byte blocks as possible;otherwise, performance degradation may occur.

Referring to FIG. 2F, in one example, an EADM Indirect Data Address Word280 includes:

-   -   Flags 282: An example flag includes:        -   Branch to next AIDAW (BNA): When set, this flag indicates            that the main storage address field does not specify a main            storage address to be used to transfer data. Instead, the            main storage address field specifies the address of the next            AIDAW to be used to transfer data.        -   When the BNA flag is set and the main storage address field            specifies an AIDAW in which the BNA flag is also set, the            address of the MSB is stored in the failing MSB address            field of the ARSB, the address of the branch-source AIDAW is            stored in the failing main storage address field of the            ARSB, and an AIDAW branch error is indicated in the            exception qualifier code field in the ARSB.        -   If an AIDAW ends at a 4K-byte boundary, the MSB specifies            additional AIDAWs, and the BNA flag is not set, the address            of the MSB is stored in the failing MSB address field of the            ARSB, the address of the AIDAW is stored in the failing main            storage address field of the ARSB, and an AIDAW list error            is indicated in the exception qualifier code field in the            ARSB.    -   Main Storage Address 284: When the BNA field is not set, this        field includes an address in main storage to be used for data        transfer and the following apply:        -   When the block size field in the MSB specifies 4K-byte            blocks, specified bits of this field contain a defined value            (e.g., zero); otherwise, a program check condition is            recognized by the channel subsystem and a main storage            specification error is indicated in the exception qualifier            code field of the ARSB.        -   When the block size field in the MSB specifies 1M-byte            blocks, specified bits of this field contain a defined value            (e.g., zeros); otherwise, a program check condition is            recognized by the channel subsystem and a main storage            specification error is indicated in the exception qualifier            code field of the ARSB.        -   When the BNA flag is set, this field includes a main storage            address of the next AIDAW to be used for data transfer.

As described above, EADM operations are specified by a Start Subchannelinstruction. That is, the program initiates EADM operations by issuing aStart Subchannel instruction that designates an ADM-type subchannel andan EADM ORB. The execution of the instruction passes the contents of theEADM ORB to the designated subchannel. The EADM ORB includes thespecification of the subchannel key (used for protection) and theaddress of the AOB to be used.

In one example, as depicted in FIG. 3A, a Start Subchannel instruction300 includes an operation code 302 specifying the Start Subchannelfunction, a first operand 304, which is an implied operand located in,for instance, general register 1, which includes the subsystemidentifier designating the ADM-type subchannel that is to be started;and a second operand 306, which is the logical address of the EADM ORB.The EADM ORB specifies the parameters used in controlling the startfunction. The contents of the EADM ORB are placed at the designatedsubchannel during the execution of Start Subchannel, prior to settingthe condition code. If the execution of Start Subchannel results in thesetting of a condition code other than a code indicating success, thecontents of the EADM ORB are not placed at the designated subchannel.

Subsequent to the execution of Start Subchannel for an ADM-typesubchannel, the channel subsystem asynchronously performs the startfunction to initiate EADM operations with the EADM facility. The startfunction includes, for instance, the following:

-   -   1. Fetching the ARQB from the AOB.    -   2. Executing the EADM operations as specified by the ARQB and        the MSBs it designates.    -   3. Conditionally storing completion information in the ARSB in        the AOB.    -   4. Causing the ADM-type subchannel to be made status pending,        indicating completion of the start function.

In one embodiment, referring to FIG. 3B, when the Start Subchannelinstruction is executed and the SID designates an ADM-type subchanneland the second operand designates an EADM ORB, an EADM operation isspecified, STEP 320. Parameters in the EADM ORB are passed to thedesignated subchannel, STEP 322, and the channel subsystem is requestedto perform a start function with the EADM Facility, STEP 324. Thechannel subsystem asynchronously performs the start function by usinginformation at the subchannel, including the information passed duringthe execution of the Start Subchannel instruction, to initiate EADMoperations, STEP 326.

Execution of an EADM operation (e.g., the first operation) includesusing information from the EADM ORB to obtain the AOB, STEP 328, andinformation is used in the AOB to obtain the EADM request block (ARQB)and a designation of one or more EADM move specification blocks (MSBs),STEP 330. The one or more designated MSBs are then fetched from mainstorage, STEP 332, and information specified in the MSBs are used tocontrol the requested EADM operation. The first operation is consideredto be started when the channel subsystem attempts to initiate datatransfer or attempts a clear or release operation.

The channel subsystem performs the operation(s) requested in the MSB(s),STEP 334. This processing is asynchronous to execution of the startcommand.

When EADM operations initiated by Start Subchannel end, STEP 336, thechannel subsystem generates status conditions, STEP 338. The generationof these conditions is brought to the attention of the program by meansof an I/O interruption, STEP 339. The program may also query theseconditions by the execution of a Test Pending Interruption instruction.

The status conditions generated are presented to the program in the formof an EADM subchannel status word (SCSW). The EADM SCSW is stored aspart of the EADM interruption response block (IRB) by the execution ofthe Test Subchannel instruction.

When the EADM operations specified in the EADM operation block (AOB) areended, the channel subsystem generates primary and secondaryinterruption status. EADM operations can be terminated by ClearSubchannel or an abnormal condition recognized while performing thestart function.

The processing of an MSB by the channel subsystem, for a move operation,controls the flow of a unit of information to or from main storage. Tochange the direction of data movement during MSB processing, a new MSBis needed. The ARQB designates the count of MSBs that comprise therequest.

Each EADM operation is represented by one MSB. An MSB may specify any ofthe following:

-   -   The transfer of blocks of data from main storage to storage        class memory.    -   The transfer of blocks of data from storage class memory to main        storage.    -   The clearing of blocks of storage class memory.    -   The releasing of blocks of storage class memory, when the EADM        Release Facility is installed.

If the blocks of storage to be transferred for a move operation are notcontiguous in main storage, a new MSB may be used or the MSB may useindirect addressing by specifying a list of EADM indirect data addresswords (AIDAWs) to designate the noncontiguous blocks. Since an MSB canspecify the transfer of data in only one direction, a new MSB is to beused when there is a change in the direction of data transfer.

The following are characteristics of EADM data transfers:

-   -   Data transfers may be processed out of order with respect to the        order of a specified MSB list.    -   Data transfers specified by multiple MSBs in an MSB list may be        processed concurrently.    -   Data transfers may be processed out of order with respect to the        order of a specified AIDAW list.    -   Data transfers specified in multiple AIDAWs in an AIDAW list may        be processed concurrently.    -   Accesses to main storage and to storage class memory are not        necessarily single-access references and are not necessarily        performed in a left-to-right direction, as observed by the        program and other CPUs.    -   If two or more EADM operations are currently active and address        the same SCM locations, main storage location, or both, the        operations may be performed concurrently and content from        different operations may be interleaved; however:        -   For input operations, the data stored by the EADM Facility            into each block of main storage that is a size equal to the            SCM block concurrency size consists of data transferred from            storage class memory by only one of the concurrent EADM            operations.        -   For output operations, each block of storage class memory            that is on a boundary and is a size equal to the SCM block            concurrency size contains the data specified by only one of            the concurrent EADM operations.        -   The above is true regardless of whether the EADM operations            are specified by a single AOB and are being processed by the            same instance of the start function or the EADM operations            are specified by different AOBs and are being processed by            different instances of the start function.    -   When EADM operations are active for a subchannel, it is        unpredictable whether changes made by the program to the ARQB,        MSBs, AIDAWs, and transfer data associated with the active        operation are observed by the EADM Facility.

When all of the blocks designated by all of the MSBs specified by theAOB have been transferred or cleared or released, the subchannelgenerates status, which is stored at the subchannel, and requests an I/Ointerruption for the ADM-type subchannel.

The conclusion of an EADM operation is normally indicated by thecombined status conditions of channel end and device end. This statuscombination represents the combination of primary and secondary statusindicating that the subchannel is available for another start functionafter the status is cleared.

As described above, an MSB may specify a data transfer operation, aclear operation, or a release operation, each of which is describedbelow.

When a move operation is requested, one or more blocks of data are movedbetween main storage and storage class memory. For instance, for a readoperation, SCM data is obtained from the SSDs that provide the contentdesignated by the specified SCM address, and then that content is storedto main memory. The process is reversed for a write operation. Theadapter(s) controlling the SSDs perform the storing. In further detail,to perform a move operation, the system firmware first translates agiven SCM address into an adapter address (e.g., logical volume address,in which a logical volume includes one or more SSDs). For instance, atranslation table is used that correlates the SCM address to an adapteraddress. System firmware then submits one or more corresponding adaptermove commands (e.g., read or write) to one or more of the I/O adapters.An adapter move command contains a main storage address, an adapteraddress, and a transfer size. The adapter then uses another translationtable to locate one or more physical SSD addresses that correspond tothe adapter address. The I/O adapter effects the move operation byeither fetching data from main storage and storing it on the SSDs, orfetching data from the SSDs and storing it in main memory. Additionaldetails are further provided in a co-filed patent application entitled“Firmware Management of Storage Class Memory”, POU920110090U51, which ishereby incorporated herein by reference in its entirety.

When a clear operation is performed, the designated increments ofstorage class memory are cleared by setting the contents to zeros.

Further, when a release operation is performed, one or more standardTRIM commands may be submitted to the SSDs containing the correspondingSCM addresses. The TRIM command allows a program to give hints aboutblock usage, allowing better garbage collection by the SSDs. The TRIMcommand allows an operating system to inform an SSD of which blocks ofstorage are no longer considered in use and can be wiped.

An EADM operation may be terminated prematurely by a Clear Subchannelinstruction. Execution of the Clear Subchannel instruction terminatesexecution of the AOB at the subchannel, clears the subchannel ofindications of the AOB in execution, and asynchronously performs theclear function. When the clear function is performed, prior to thesubchannel becoming status pending, data transfer is terminated and theamount of data transferred is unpredictable. Execution of the clearfunction does not result in the generation of status, but does cause thechannel subsystem to make an I/O interruption pending.

In one embodiment, referring to FIG. 3C, a Clear Subchannel instruction350 includes an operation code 352 designating the Clear Subchannelfunction. The subchannel to be cleared is designated by a subsystemidentification word in, for instance, general register 1.

The clear function for an ADM-type subchannel includes:

-   -   1. Ensuring that the current data transfer is terminated.    -   2. Modifying fields at the subchannel and conditionally the        ARSB. For instance, the subchannel status word is modified to        indicate the clear function in the Function Control field and in        the Activity Control field. The ARSB may be modified to reflect        any detected errors.    -   3. Causing the subchannel to be made status pending indicating        completion of the clear function.

Other instructions may also be issued that can specify an ADM-typesubchannel, including Test Subchannel, Modify Subchannel and StoreSubchannel, each of which is described below.

Referring to FIG. 3D, in one example, a Test Subchannel instruction 360includes, for instance, an operation code 362 specifying the testsubchannel function; a first operand 364, which is an implied operandlocated in, for instance, general register 1 that contains the subsystemidentification word designating the subchannel that is to be tested; anda second operand 366 which is the logical address of the InformationResponse Block (IRB) at which information is stored.

When Test Subchannel is executed specifying an ADM-type subchannel, thesubchannel is status pending, and information is stored in thedesignated EADM IRB (Interruption Response Block), a specified conditioncode is set. When the subchannel is not status pending and statusinformation is stored in the designated EADM IRB, a defined conditioncode is set. When the subchannel is not provided or not enabled, noaction is taken.

In one example, the EADM IRB includes a Subchannel Status Word (SSW) andan Extended Status Word (ESW), as well as an Extended Control Word thatmay provide additional model dependent information describing conditionsthat may exist in the facility. Each of these words is described furtherbelow after discussion of the various instructions that can specify anADM-type subchannel.

Referring to FIG. 3E, in one embodiment, a Modify Subchannel instruction370 includes an operation code 372 specifying the Modify Subchannelfunction; a first operand 374, which is an implied operand located in,for instance, general register 1, which includes the subsystemidentification word designating the subchannel to be modified; and asecond operand 376, which is the logical address of a subchannelinformation block (SCHIB) associated with the subchannel.

When Modify Subchannel is executed specifying an ADM-type subchannel,and information from the specified Subchannel Information Block (SCHIB)is placed in the subchannel, a specific condition code is set. When thesubchannel is status pending, no action is taken and a defined conditioncode is set. When the subchannel is busy for a start or clear function,no action is taken.

Referring to FIG. 3F, one example of a Store Subchannel instruction isdescribed. In one example, a Store Subchannel instruction 380 includesan operation code 382 identifying the Store Subchannel function; a firstoperand 384, which is an implied operand located in, for instance,general register 1 that includes a subsystem identification worddesignating the subchannel for which the information is being stored;and a second operand 386 which is the logical address of the SCHIB.

When Store Subchannel is issued specifying an ADM-type subchannel, and aSCHIB is stored, a specified condition code is set. When the designatedsubchannel is not provided in the channel subsystem, no action is taken.

One example of a subchannel information block for an ADM-type subchannelEADM SCHIB) is described with reference to FIG. 4A. In one example, an(EADM SCHIB 400 includes a model dependent area 401, which includesmodel dependent information. Further, SCHIB 400 includes a pathmanagement control word (PMCW) 402, and a subchannel status word (SCSW)404, each of which is described below.

In one example, EADM PMCW 402 includes, for instance, the followingfields as shown in FIG. 4B:

-   -   Interruption Parameter 410: This field includes the interruption        parameter that is stored in the I/O interruption code. The        interruption parameter can be set to any value by Start        Subchannel and Modify Subchannel. The initial value of the        interruption parameter field in the subchannel is zero.    -   Interruption Subclass (ISC) 412: This field includes a plurality        of bits that are an unsigned binary integer, in a specified        range, that corresponds to the bit position of the I/O        interruption subclass mask bit in a specified control register        of each CPU in the configuration. The setting of the mask bit in        the control register of a CPU controls the recognition of        interruption requests relating to the subchannel by that CPU.        The ISC can be set to a value by Modify Subchannel. The initial        value of the ISC field in the subchannel is, for instance, zero.    -   Enabled (E) 414: This field, when set, indicates that the        subchannel is enabled for all EADM functions.    -   Subchannel Type (ST) 416: This field designates the subchannel        type. Depending on the model and the configuration, one or more        of the following subchannel types may be provided: I/O        subchannel or ADM subchannel.    -   The value of this field is determined when the subchannel is        configured and cannot be changed by Modify Subchannel.    -   When the Modify Subchannel instruction is executed and        designates an ADM-type subchannel, ST is to indicate ADM        subchannel; otherwise, an operand exception is recognized.

Returning to FIG. 4A, the subchannel information block also includessubchannel status word 404. The EADM subchannel status word (SCSW)provides indications to the program that describe the status of anADM-type subchannel and associated EADM operations. In one example, asshown in FIG. 4C, subchannel status word 404 includes:

-   -   Subchannel Key (Key) 420: When the EADM start function indicator        in the function control field (described below) is set, this        field includes the storage access key used by the channel        subsystem. These bits are identical with the key specified in        the EADM ORB when Start Subchannel was executed.    -   Extended Status Word Format (L) 422: When the status pending        indicator of the status controls field (described below) is set,        this field, when set, indicates that a format-0 ESW has been        stored. A format-0 ESW is stored when an interruption condition        containing any of the following indications is cleared by Test        Subchannel:        -   Program check        -   Protection check        -   Channel data check        -   Channel control check        -   Extended asynchronous data move facility (EADMF) check    -   Deferred Condition Code (CC) 424: When the EADM start function        indicator is set and the status pending indicator is also set,        this field indicates the general reason that the subchannel was        status pending when Test Subchannel or Store Subchannel was        executed. The deferred condition code is meaningful when the        subchannel is status pending with any combination of status and        only when the start function indicator of the function control        field in the SCSW is set.    -   The deferred condition code, if set, is used to indicate whether        conditions have been encountered that preclude the subchannel        from becoming subchannel active while the subchannel is start        pending.    -   Example deferred condition codes include:        -   A normal I/O interruption has been presented.        -   Status is present in the EADM SCSW that was generated by the            channel subsystem for conditions that preclude the EADM            start function from being successfully initiated. That is,            the subchannel did not transition to the subchannel active            state.    -   CCW Format (F) 426: When the EADM start function indicator is        set, this field is stored as a defined value.    -   Prefetch (P) 428: When the EADM start function indicator is set,        this field is stored as a defined value.    -   Extended Control (E) 430: This field when set indicates that        model dependent information is stored in the EADM extended        control word (ECW).    -   Function Control (FC) 432: The function control field indicates        the EADM functions that are indicated at the subchannel. Example        functions include:        -   EADM start function: When set, indicates that an EADM start            function has been requested and is either pending or in            progress at the ADM-type subchannel. The EADM start function            is indicated at the subchannel when a successful condition            code is set for Start Subchannel. The EADM start function is            cleared at the subchannel when Test Subchannel is executed            and the subchannel is status pending. The EADM start            function is also cleared at the subchannel during execution            of Clear Subchannel.        -   EADM clear function: When set, indicates that an EADM clear            function has been requested and is either pending or in            progress at the ADM-type subchannel. The EADM clear function            is indicated at the subchannel when a successful condition            code is set for Clear Subchannel. The EADM clear function            indication is cleared at the subchannel when Test Subchannel            is executed and the subchannel is status pending.    -   Activity Control (AC) 434: The activity control field indicates        the current progress of the EADM function previously accepted at        the subchannel.    -   All conditions that are represented by bits in the activity        control field are reset at the ADM-type subchannel when Test        Subchannel is executed and the subchannel is status pending.    -   Example activities include:        -   Start pending: When set, indicates that the subchannel is            start pending. The channel subsystem may or may not be in            the process of performing the EADM start function. The            subchannel becomes start pending when a successful condition            code is set for Start Subchannel. The subchannel remains            start pending when performing the EADM start function and            the channel subsystem determines conditions exist that            prevent the fetching of the ARQB.        -   The subchannel is no longer start pending when any of the            following occurs:            -   The channel subsystem attempts to initiate the first                data transfer specified by the AOB.            -   Clear Subchannel is executed.            -   Test Subchannel clears a status condition at the                subchannel.        -   Clear pending: When set, the subchannel is clear pending.            The channel subsystem may or may not be in the process of            performing the EADM clear function. The subchannel becomes            clear pending when a specified condition code is set for            Clear Subchannel.        -   The subchannel is no longer clear pending when either of the            following occurs:            -   The EADM clear function is performed.            -   Test Subchannel clears the status pending condition                alone.        -   Subchannel active: When set, indicates that the ADM-type            subchannel is subchannel active. The ADM-type subchannel is            said to be subchannel active when the channel subsystem            attempts to initiate the first data transfer specified by            the AOB or perform a first operation (whichever happens            first).        -   The subchannel is no longer subchannel active when either of            the following occurs:            -   The subchannel becomes status pending.            -   Clear Subchannel is executed.    -   Status Control (SC) 436: The status control field provides the        program with summary level indication of the interruption        condition described by information in the subchannel status and        device status fields. More than one status control indicator may        be set as a result of conditions at the subchannel.    -   Example status controls include:        -   Alert status: When set, indicates that an alert interruption            condition exists. An alert interruption condition is            recognized when alert status is present at the subchannel.            Alert status is generated by the channel subsystem under any            of the following conditions:            -   The ADM-type subchannel is start pending and the status                condition precludes initiation of the first data                transfer.            -   The subchannel is subchannel active and an abnormal                condition, that is being reported as subchannel status,                has terminated EADM operations.        -   When Test Subchannel or Clear Subchannel is executed, the            alert status is cleared at the subchannel.        -   Primary status: When set, indicates a primary interruption            condition exists. A primary interruption condition is            recognized when primary status is present at the subchannel.            A primary interruption condition is a solicited interruption            condition that indicates, when accompanied by the secondary            interruption condition, completion of the EADM start            function at the subchannel.        -   When Test Subchannel or Clear Subchannel is executed, the            primary interruption condition is cleared at the subchannel.        -   Secondary status: When set, indicates a secondary            interruption condition exists. A secondary interruption            condition is recognized when secondary status is present at            the subchannel. A secondary interruption condition is a            solicited interruption condition that indicates, when            accompanied by the primary interruption condition,            completion of the EADM start function at the subchannel.        -   When Test Subchannel or Clear Subchannel is executed, the            secondary interruption condition is cleared at the            subchannel.        -   Status pending: When set, indicates that the subchannel is            status pending and that information describing the cause of            the interruption condition is available. When Test            Subchannel is executed, storing an EADM SCSW with the status            pending bit set, all EADM SCSW indications are cleared at            the subchannel placing the subchannel in the idle state. The            status pending condition is also cleared at the subchannel            during the execution of Clear Subchannel.        -   When status pending is set, all accesses to main storage and            to storage class memory for the subchannel ARSB have            terminated.    -   Subchannel Status 438: ADM-type subchannel status conditions are        detected and stored in the subchannel status field by the        channel subsystem. The subchannel status field is meaningful        when the subchannel is status pending. Except for conditions        caused by equipment malfunctions, subchannel status can occur        only when the channel subsystem is involved with processing an        EADM function.    -   Examples of status conditions include:        -   Program check: Program check occurs when programming errors            are detected by the channel subsystem.        -   Protection check: Protection check occurs when the channel            subsystem attempts a storage access that is prohibited by            the protection mechanism. Protection applies to the fetching            of the ARQB, MSBs, AIDAWs, and data to be transferred to            storage class memory, and to the storing of information in            the ARSB and data transferred from storage class memory.        -   Channel data check: Channel data check indicates that an            uncorrected storage error was detected in regard to the            fetching of data from main storage or the storing of data            into main storage.        -   Channel control check: Channel control check indicates that            an uncorrected storage error was detected in regard to the            fetching or storing of the AOB, MSBs, or AIDAWs, or that a            machine malfunction was encountered by the channel subsystem            and the malfunction affected EADM operations.        -   Extended asynchronous Data Move (EADM) Facility check: EADM            Facility check indicates that an error was detected by the            EADM Facility in regard to the transfer of data to or from            storage class memory or in regards to performing an            operation on the storage class memory.    -   When a program check, protection check, channel data check,        channel control check, or EADM Facility check condition is        recognized by the channel subsystem, EADM operations are        terminated and the channel is made status pending with primary,        secondary, and alert status.    -   EADM Operation Block Address 440: This field includes the EADM        Operation Block Address.    -   Device Status 442: This includes device end or channel end.

When ESW format 422 of the subchannel status word is set and thesubchannel is status pending, an EADM subchannel extended status word(EADM ESW) is provided that specifies additional information about theADM-type subchannel.

In one example, referring to FIG. 4D, an EADM subchannel extended statusword 450 includes:

EADM Subchannel Logout 452: The EADM subchannel logout includes, in oneexample:

-   -   Extended Status Flags (ESF): A field whose bits, when one,        specify that an error has been detected by the channel        subsystem.

Examples of extended status flags include:

-   -   Key check: When set, indicates that the channel subsystem has        detected an invalid checking block code (CBC) on the associated        storage key when referencing data in the EADM operation block        (AOB), in an EADM move specification block (MSB), or in an EADM        indirect data address word (AIDAW).    -   AOB address validity: When set, indicates that the address        stored in the AOB address field of the SCSW is usable for        recovery purposes.

EADM Extended Report Word 454 that includes, for instance:

-   -   An EADM Operations Block Error (B) indicator that when set,        specifies that the exception status stored in the EADM SCSW is        associated with the specified EADM operation block (AOB); and an        EADM Response Block Stored (R) indicator that when set indicates        the EADM response block (ARSB) is stored.

When the extended control indicator of the SCSW and the extended statusword format indicator of the SCSW are set, the EADM extended controlword provides additional information of a model dependent nature thatdescribes conditions that may exist at the EADM facility.

Additionally, the following channel report words (CRWs) may be reportedfor ADM-type subchannels: subchannel installed parameters initialized;subchannel installed parameters restored; subchannels available; channelevent information pending.

Unsolicited events and malfunctions that occur in the EADM Facility maybe reported by the channel event information pending CRW.

Described in detail above is an Extended Asynchronous Data MoverFacility used to move data blocks between main storage and storage classmemory and to perform other operations on the storage class memory. Inone embodiment, information about the EADM Facility and storage classmemory is obtained using an EADM command. In particular, since storageclass memory is not directly accessible, a capability is provided todetermine whether storage class memory is allocated, and if so, toobtain information regarding the configuration. In particular, in oneexample, a capability is provided to communicate to a control program(e.g., operating system) whether or not any storage class memory hasbeen allocated, and if so, how much and at what locations. Thecapability for determining available storage class memory is referred toherein as discovery and one example of a discovery function is providedby a Store Storage Class Memory (SCM) Information (SSI) command.

The Store Storage Class Memory Information (SSI) command is used toobtain information about the storage class memory and the ExtendedAsynchronous Data Mover Facility. The SSI command returns the followinginformation obtained from, for instance, the channel subsystem. Thisinformation is described in further detail below:

1. Characteristics of the EADM Facility, including:

-   -   Maximum count of Move Specification Blocks (MSBs) per AOB.    -   Maximum block count per MSB.

2. Characteristics of storage class memory, including:

-   -   SCM increment size.    -   List of SCM address increments within the SCM address space.    -   Model dependent maximum SCM address.

Execution of the Store SCM Information command, which is synchronous,does not change any information contained in the channel subsystem.

Further details regarding the SSI command are described with referenceto FIGS. 5A-5D. Referring initially to FIG. 5A, in one embodiment, acommand request block 500 for the Store SCM Information commandincludes, for instance:

-   -   Length 502: A value specifying a length of the command request        block.    -   Command Code 504: A value that specifies the command code for        the Store SCM Information command.    -   Format (FMT) 506: A value that specifies the format of the        command request block.    -   Continuation Token 508: A value that may request a continuation        point at which to resume from a prior response that was not        complete. If the value of the continuation token is zero, a        fresh start is made. If the value of the continuation token is        nonzero and not recognized, a fresh start is made.

One embodiment of a response block 520 of the SSI command is describedwith reference to FIG. 5B, and includes, for instance:

-   -   Length 522: A value that indicates the length in bytes of the        command response block.    -   Response Code 524: A value that describes the results of an        attempt to execute the SSI command. The response code value        dictates the length of the response block. For example, if a        selected response code is stored, the length specifies 96+N×16        bytes, where N is the number of storage class memory address        list entries, described below. In one example, N is in the range        1≦N≦248.    -   Format (FMT) 526: A value that indicates the format of the        command response block. The value of the field is, for instance,        zero.    -   RQ 528: A response qualifier value, as defined below:        -   No response qualification exists.        -   The specified continuation token is not recognized and is            treated as if zero had been specified.    -   Maximum Block Count per MSB (MBC) 530: A value that indicates        the maximum value that may be used in the block count field of a        move specification block (MSB).    -   Maximum SCM Address (MSA) 532: A value that indicates the model        dependent maximum SCM address. It is the SCM address of the last        byte in the highest addressable SCM increment.    -   SCM Increment Size (IS) 534: A value that represents the size of        each SCM increment in the SCM address list and is, for instance,        a power-of-two.    -   Maximum MSB Count (MMC) 536: A value that indicates the maximum        count of move specification blocks (MSB) that may be specified        in an EADM-operation block (AOB).    -   Maximum Configurable SCM Increments (MCI) 538: A value that is        the maximum number of SCM increments that may be configured to        the requesting configuration.    -   In one embodiment, MCI does not exceed 2^((64-IS)). For example,        for a 16 G-byte SCM increment size, MCI≦2⁽⁶⁴⁻³⁴⁾, since all the        16 G-byte SCM increments are to be addressable within the        addressing constraint of a 64-bit address. Furthermore,        ((MCI+1)×IS)−1 does not exceed the model-dependent maximum SCM        address.    -   The number of configured SCM increments (NCI) reduces the total        size (TS) that may be specified when a successful Configure        Storage Class Memory command, described below, is executed, such        that TS≦(MCI−NCI). However, based upon the entire capacity of        the system and allocations already made to other configurations,        the number of SCM increments in the initialized state may or may        not be able to completely satisfy a request to otherwise validly        configure up to the MCI limit of the requesting configuration.    -   Total Initialized SCM Increments of CPC 540: A value that        represents the number of SCM increments in the initialized state        for the system (e.g., for a central processing complex (CPC)).        If the system is logically partitioned, this is the number of        increments available in total for allocation to/by the        partitions.    -   Total Uninitialized SCM Increments of CPC 542: A value that        represents the number of SCM increments in the uninitialized        state for the system (e.g., for the CPC).    -   SCM Measurement Block Size 544: A value that is the block size        (BS) in bytes of an SCM measurement block. In one example, it is        a power of 2, and the maximum SCM measurement block size is, for        instance, 4096 bytes.    -   Maximum Number of SCM Resource Parts 546: A value that is the        maximum number on the CPC of SCM resource parts (RP) (e.g., I/O        adapters). Each SCM increment is associated with an SCM resource        part. Each SCM resource (e.g., one or more I/O adapters and one        or more SSDs) includes one or more parts. The maximum number of        SCM resource parts is, for instance, 509.    -   In one example, the term “resource part” is defined for use in        obtaining measurement information relating to the storage class        memory. Each SCM increment can be distributed across multiple        adapters and each adapter has some utilization/measurement data        to impart. So, each measurement block returned is identified by        a tuple consisting of the increment identifier plus the resource        identifier.    -   SCM Data Unit Size 548: A model dependent value that indicates        the number of bytes that are included in an SCM data unit. In        one example, the data unit is defined for use in obtaining        measurement information relating to the storage class memory.        The count that is reported is the count of data units, rather        than bytes.    -   Continuation Token 550: A model dependent value by which a        subsequent issue of the SSI command may continue at the        continuation point represented by the token. The contents of a        continuation token are model dependent.    -   Storage Class Memory Address List 552: An origin of the SCM        address list. When the response code stored is a predefined        value, a plurality of SCM address list entries (SALE) are stored        (e.g., (Length−96)/16 SALEs are stored).    -   In one example, the number of SALEs stored depends on the number        of SCM increments in the requester's configuration, the status        of each when the command is executed, and the channel subsystem        model. Zero or more SALEs are stored and the actual number        stored is determined, in one example, by subtracting 96 from the        size of the response block (Length), and then dividing that        result by 16.    -   Each SCM address list entry (SALE) represents one SCM increment        which occupies a range of SCM addresses. The starting SCM        address of the SCM increment represented by the SALE is        contained in the SALE and is the SCM address of the first byte        of the corresponding SCM increment. The ending address is        calculated, in one example, by adding the SCM increment size, in        bytes, to the starting SCM address and then subtracting one.        This is the SCM address of the last byte of the SCM increment.        The storage class memory represented by a SALE is a contiguous        set of SCM byte locations, which begins on a natural 2^(IS) byte        boundary, in one embodiment.    -   A SALE is stored when the corresponding SCM increment is in the        configured stated and space is available in the response block        for the SALE. If space in the SCM address list of the response        block is exhausted, a value is stored in the continuation token        and execution completes with a specific response code.

Two or more SALEs are stored in ascending order of their SCM addresses.

One embodiment of a SALE is described with reference to FIG. 5C. In oneexample, a SALE 552 includes, for instance:

-   -   SCM Address (SA) 560: A value that is the starting SCM address        of byte 0 of the corresponding SCM increment in the SCM address        space, aligned on the natural boundary determined by the SCM        increment size (2^(IS) bytes).    -   Persistence Attribute (P) 562: A value that indicates the        current persistence rule applicable to the SCM increment. Any        location within the SCM increment inherits the persistence rule.        The possible persistence rules includes:        -   Rule 1—Retain data when power is off.        -   Rule 2—Retain data until power on reset or IML.    -   Op State 564: A value that indicates the operation state of the        storage class memory increment represented by the SALE. The        operation state is valid only when the associated SCM increment        is in the configured state.    -   Examples of operation state include:        -   Operational (Op): The storage class memory represented by            the SALE is available for all I/O operations. The            operational state is entered upon a successful configuring            and may be re-entered upon exit from the temporary or            permanent error state.        -   Temporary error (TE): The storage class memory represented            by the SALE is not available for any I/O operations. The            data state is invalid but the data content at the transition            from operational to temporary error is preserved. The            temporary error state is entered from the operational state            when access to the SCM increment does not exist.        -   Permanent error (PE): The storage class memory represented            by the SALE is not available for any I/O operations. The            data state is invalid and the data is lost. The permanent            error state is entered from the temporary error state or            operational state when an uncorrectable error condition is            recognized.    -   When an operation completes with an indication of permanent        error set in the exception qualifier code of the EADM response        block, at least that corresponding SCM increment has entered the        permanent error state. However, more than the one SCM increment        may have entered the permanent error state.    -   When an SCM increment is not in the operational state, an I/O        operation that references a location in the increment recognizes        an extended asynchronous data move facility check with either a        temporary or a permanent error set in the exception qualifier        code of the EADM response block.    -   Data State 566: A value that indicates the data state of the        contents of the storage class memory increment represented by        the SALE. The data state is valid when the associated SCM        increment is in the configured and operational states.    -   Example data states include:        -   Zeroed—The contents of the SCM increment is all zeros.        -   Valid—The contents of the SCM increment is the accumulation            of all successful write type operations. Locations in the            increment not yet written remain either zeroed or            unpredictable.        -   Unpredictable—The contents of the SCM increment prior to any            write type I/O operation are not known. After one or more            write type operations have been performed, data content of            other, unwritten locations remains unpredictable even though            the locations successfully written result in the data state            of the SCM increment becoming valid.    -   A transition from either zeroed or unpredictable states to valid        state occurs with the first successful write. Due to any        difference between size of data written and size of the target        SCM increment, the change to valid does not describe the actual        condition of any data location not yet written. Such a location,        not having been accessed for a write, is effectively still        described as zeroed or unpredictable.    -   Rath 568: A value that indicates the conceptual quality of the        storage class memory increment represented by the SALE. Rath is        valid only when the associated SCM increment is in the        configured and operational states. A value of zero means that no        rank exists. A nonzero value in a specified range means that a        rank exists. In this example, a rank value of one is the highest        or best rank. A rank value of fifteen is the lowest or worst        rank. All else equal, an SCM with a higher rank is to be        preferred over an SCM with a lower rank.    -   R 570: This field indicates that the SCM increment recognizes a        release operation. The following behaviors are related:        -   1. A released block is first to be written before being            read, otherwise an error on a read operation is recognized            if a read precedes a write. For such an error, the SCM            increment remains in the operational state.        -   2. Upon initial configuration, the data state is zeroed.        -   3. The program may do a special operation, called a release,            which places a specified block into the released condition.    -   Resource ID 572: A nonzero value is a resource identifier (RID)        of the resource that provides the SCM increment represented by        the SALE. When the RID is zero, no resource ID is indicated. In        one particular example, the RID represents as many adapters and        SSDs that provide storage for the SCM increment. As certain RAID        algorithms may be applied, or striping for improving performance        by allowing concurrent I/O operations across multiple        adapter/SSDs, the RID may represent a compound entity.

Further details regarding the configuration states of the storage classmemory, and the operation and data states of the storage class memoryaddress list are described below.

Initially, referring to FIG. 6A, the configuration states and theevents/actions that result in transitions within these states aredescribed. As shown, the SCM states are configured, standby andreserved. An SCM can be placed in standby from reserved, and then fromstandby to configured. From configured, the SCM can be deconfigured andenter a state of reserved.

Referring to FIG. 6B, operation states and the events that result intransitions within these states are shown. An SCM increment is to be inthe standby state to be configured and is in the operational state uponsuccessful completion of a configure action. A first write to an SCMincrement in the zeroed state moves it to the valid state. Anintervening power off and then power on of an SCM increment that is notindicated as having a rule 1 persistence moves the SCM increment to theunpredictable state.

An error (E) may cause transition to the temporary error (TE) state orthe permanent error state (PE), depending on the model dependentspecifics of the error. Acquisition (A) of connectivity may causetransition from the temporary error state to the operational (Op) state.A deconfigure of an SCM increment can occur regardless of its operationstate.

FIG. 6B also illustrates the data states when in the operational state,according to how the operational state was entered. The data state isvalid and applies to the corresponding SCM increment when it isconfigured and in the operational state. The valid data states arezeroed, unpredictable, and valid. The following are the possible datastates at the various entries to the operational state:

-   -   From standby—zeroed (z)    -   From temporary error—valid (v)    -   From permanent-error—unpredictable (u) or zeroed (z)    -   From operational—valid (v)—first write    -   From operational—unpredictable (u)—power cycled and persistence        is not rule 1.

When not in the operational state, the data state is invalid.

When first configured and prior to the first write, the data of an SCMincrement is in the zeroed state, meaning that its contents are allzeros.

While the data content of an SCM increment is not changed when moving toor in the temporary error state, the increment is not accessible. Thus,saying that the data is valid might be descriptive, but not overlymeaningful due to lack of program accessibility. Therefore, the datastate is invalid in this scenario. Also, based on the error that causesthe transition from operational to temporary error, if data integrity isaffected, the permanent error state is entered, the data state remainsinvalid, and the data is lost. If a concurrent repair can move an SCMincrement in the permanent error state to the operational state withoutbeing both deconfigured and then configured again, the original data isstill lost, and it is model dependent whether the data state is eitherunpredictable or zeroed.

The persistence of an SCM increment and its RAS (reliability,accessibility and serviceability) characteristics can also determine achange from valid to unpredictable data state. If persistence isexceeded, it is expected that the data state transitions from valid tounpredictable.

A transition from either zeroed or unpredictable data states to thevalid data state occurs with the first successful write. Due to anydifference between size of data written and size of the target SCMincrement, the change to valid does not describe the actual condition ofany data location not yet written. Such a location, previous to a firstwrite access, is effectively still described as zeroed or unpredictable.

After an SCM increment is configured, an unsolicited notification ismade pending when any one or more events occur that are observable inthe response of the Store SCM Information command. Examples are:

-   -   1. Operation state changes from operational to temporary error        or permanent error, but not reported in a failed operation.    -   2. Operation state changes from temporary error to operational.    -   3. Operation state changes from temporary error to permanent        error.    -   4. Rath change.

Examples where unsolicited notifications are not made pending includethe following:

-   -   1. Data state changes from zeroed or unpredictable to valid.    -   2. A Configure Storage Class Memory command completes.    -   3. A Deconfigure Storage Class Memory command completes.

When a notification is pending, the program observes the notificationand may issue the Store SCM Information command to obtain theinformation. The Store SCM Information command may also be issued atother times in which the program would like information about the SCMand/or SALE.

In one example, a notification includes a machine check interruptionbeing issued to the program, with a corresponding CRW indicating anevent report. The program issues the CHSC Store Event Informationcommand and obtains a response block with a content code signaling astorage class memory change notification.

In one embodiment, the Store SCM Information (SSI) command is a channelsubsystem command issued by the program (e.g., operating system) toobtain information about the storage class memory and/or an SCM addresslist entry. In one example, the program issues a Channel Subsystem Callinstruction and the SSI command is indicated in a command block of theinstruction, which is sent to the channel subsystem. The command isperformed at the channel subsystem and a response is returned in aresponse block, which is the remaining portion of the 4K-byte controlblock (i.e., the requested information is stored in the main storagearea designated for the response block). Further details regardingoperation of the command are described with reference to FIG. 5D.

Initially, the program generates the request block indicated above torequest the Store SCM Information command, STEP 580. The request blockis obtained by the channel subsystem, STEP 582, and one or more validitychecks are made as to the validity of the request block (e.g., validlength field, valid command request block format, command installed,etc.). If the request is not valid, INQUIRY 584, then a response codeindicating the problem is placed in the response block, STEP 586, andthe response block is returned, STEP 592.

However, if the request is valid, INQUIRY 584, then the channelsubsystem obtains the information from the machine (e.g., processors,etc.), STEP 588, and fills in the response block, STEP 590. The responseblock is returned, STEP 592. For instance, the information is containedin non-volatile storage of the machine and is loaded by firmware intomain storage only accessible by firmware during system initialization.The channel subsystem (i.e., firmware in this case) obtains theinformation by reading it from main storage only accessible by firmware,and populates the response block.

Responsive to receiving the information about the storage class memoryor otherwise, a decision may be made to change the configuration of thestorage class memory. This decision may be made manually orautomatically by the program or other entity. The configuration may bechanged by adding increments or deleting increments, as described below.

In one example, to configure the storage class memory, a ConfigureStorage Class Memory command is used. This command requests an amount ofstorage class memory to be configured from the available pool of thesystem. The amount is specified as a size, encoded as a count of SCMincrements.

Unless stated otherwise, the number of SCM increments used to satisfythe request is in the initialized state. If the number of SCM incrementsrequested would cause the maximum configurable SCM increments limit tobe exceeded, a specific response code is provided.

The contents of each increment are zeros with valid CBC. The applicablepersistence rule associated with each configured SCM increment is setby, for instance, manual controls.

One embodiment of a command request block for the Configure StorageClass Memory command is depicted in FIG. 7A. In one example, a ConfigureStorage Class Memory request block 700 includes:

-   -   Length 702: A value that specifies a length of the command        request block length.    -   Command Code 704: A value that specifies the command code for        the Configure Storage Class Memory command.    -   Format (FMT) 706: A value that specifies the format of the        command request block.    -   Total Size (TS) 708: A value that specifies the size of storage        class memory requested, encoded as a count of SCM increments.        The count of SCM increments already configured plus TS is not to        exceed the maximum configurable SCM increments (MCI) limit. If        the number of SCM increments in the initialized state is less        than the specified total size, a specific response code is        provided.    -   Asynchronous Completion Correlator (ACC) 710: A value that is        returned in the asynchronous completion notification field of a        notification response described below. The correlator serves to        resume the original thread that initiated the request.

One embodiment of a command response block for the Configure StorageClass Memory command is depicted in FIG. 7B. In one embodiment, acommand response block 730 includes:

-   -   Length 732: A value that indicates a length the command response        block.    -   Response Code 734: A value that describes the results of the        attempt to execute the Configure Storage Class Memory command.    -   If a defined response code is stored in the response code field,        an asynchronous process is initiated to finish processing of the        command. If a response code other than the defined code is        stored in the response code field, no SCM increment is        configured, no asynchronous process is initiated, and no        subsequent notification is made. Completion of the asynchronous        process is indicated in the notification response.    -   Format (FMT) 736: A value that indicates the format of the        command response block.

The Configure Storage Class Memory command is issued by the program torequest an amount of storage class memory to be configured into the SCMaddress space. One embodiment of the logic used to configure the SCM isdescribed with reference to FIG. 7C.

Initially, the program issues a Channel Subsystem Call instruction thatincludes a Configure SCM command, STEP 740. The request block of theConfigure SCM command is obtained by the channel subsystem, STEP 742,and the channel subsystem attempts to execute the command, STEP 744. Ifthe attempt to execute the command produces a response code that doesnot indicate success, INQUIRY 746, then the response code is placed inthe response block of the Configure SCM command, STEP 748, and theresponse block is returned, STEP 750.

If a successful response code is indicated, INQUIRY 746, then theresponse code is placed in the response block, STEP 752, and theresponse block is returned, STEP 754. In this example, a successfulresponse code indicates that the length field of the request block isvalid; the command is available in the system; the command request blockhas a valid format; the channel subsystem is able to perform the command(i.e., not busy); the total size requested does not exceed the maximumconfigurable SCM increments limit of the requested configuration; andthe total size requested does not exceed the number of SCM increments inthe initialized state.

Additionally, an asynchronous process to complete the configuration isinitiated, STEP 756. Further details regarding this processing isdescribed with reference to FIG. 7D.

In one embodiment, the asynchronous processing performs theconfiguration to allocate the one or more increments, STEP 760. Forinstance, for each configured SCM increment, internal controls arechanged to allow the newly-configured increment to be accessible to I/Omove requests to that partition. In particular, responsive to thechannel subsystem receiving the CHSC Configure command, the firmware ofthe channel subsystem examines internal tables to confirm there areenough increments to satisfy the request and to ensure the request doesnot exceed the maximum configurable SCM increments for theconfiguration. If the request is valid, firmware updates one or moretables to allocate the increment(s) to the configuration and place theincrement(s) in the operational state for the configuration. Theincrements are then accessible to I/O move requests (described above)from the configuration. Completion of the asynchronous process isindicated in a notification response, STEP 762.

Notification response data for the Configure Storage Class Memorycommand is returned in a response block of a Store Event Information(SEI) command. One embodiment of the format of the notification responseblock used for the Configure Storage Class Memory command is describedwith reference to FIG. 8A.

In one embodiment, a notification response block 800 of the ConfigureStorage Class Memory command includes:

-   -   Length 802: A value that indicates the length of the command        response block.    -   Response Code 804: A value that describes the results of the        attempt to execute the Store Event Information CHSC command.    -   Format (FMT) 806: A value that indicates the format of the        command response block.    -   Notification Type 808: A value that indicates that this is an        EADM related notification.    -   P 810: When set, specifies that the channel subsystem has        pending event information in addition to the information        provided in response to this CHSC command.    -   V 812: When set, specifies that the channel subsystem has        recognized an overflow condition and event information has been        lost.    -   Content Code 814: A value that indicates that this is a response        to the conclusion of execution of the asynchronous process        initiated by the Configure Storage Class Memory command request.    -   Secondary Response Code 816: A value that further describes the        results of the attempt to execute the Configure SCM command.    -   When the secondary response code is a specified value, the        complete amount of storage class memory, as originally        requested, has been configured. Otherwise, response codes may be        provided that indicate, for instance, invalid length field,        Configure SCM command not installed, Configure SCM command block        has an invalid format, total requested size would exceed MCI        limit, total size requested exceeds the number of SCM increments        in initialized state, channel subsystem busy.    -   Asynchronous Completion Correlator (ACC) 818: A value that is        originally specified in the corresponding command request block.

One embodiment of the Store Event Information command used to return thenotification response block for the Configure Storage Class Memorycommand is described with reference to FIGS. 8B-8C.

The Store Event Information command is used to store event informationthat has been made pending by the channel subsystem. Normally, thiscommand is executed as a result of the program having received an eventinformation pending channel report.

The execution of the Store Event Information command may changeinformation contained in the channel subsystem. The Store EventInformation command is executed synchronously.

One embodiment of a command request block for the Store EventInformation command is described with reference to FIG. 8B. In oneexample, a request block 830 includes:

-   -   Length 832: This field specifies a length of the command request        block.    -   Command Code 834: This field specifies the Store Event        Information command.    -   Format (FMT) 836: A value that specifies the format of the        command request block.    -   Notification Type Selection Mask (NTSM) 838: A mask where each        bit position corresponds to a logical processor selector (LPS)        value of the same numeric value. In one example, bit 0 is        ignored and assumed to be one. When a bit position in a        specified range starting at 1 is zero, a notification type        corresponding to that bit position is not stored in the response        block, and is discarded if recognized as pending. When such a        bit is one, a notification type corresponding to the bit        position may be stored in the response block.

In one embodiment, referring to FIG. 8C, a response block 850 for theStore Event Information command is described below:

-   -   Length 852: A value that specifies the initial length of the        command response block. The completion length depends on the        response code that is stored as a result of the attempt to        execute the Store Event Information command.    -   If a response code other than a code indicating success is        stored in the response code field, no information is stored in        the response data area.    -   If a response code indicating success is stored in the response        code field, event information is stored in the response data        area.    -   Response Code 854: A value that describes the results of the        attempt to execute the store event information command.    -   For the Store Event Information command, the response data area        contains a fixed length portion and a variable length portion.    -   For a specified format response, when NT is nonzero, the format        depends upon the particular notification type, and the format of        the content code dependent field depends upon the particular        notification type and the content code (CC) field, taken        together.    -   Format (FMT) 856: A value that specifies the format of the        command response block.    -   Notification Type (NT) 858: A value that indicates the        notification type (NT). A specific value is provided for the        Configure SCM command.    -   P Flag 860: When set, specifies that the channel subsystem has        pending event information in addition to the information        provided in response to this CHSC command. The program can        obtain the additional information by executing the Store Event        Information command again. When not set, this flag specifies        that the channel subsystem has no additional pending event        information.    -   V Flag 862: When set, specifies that the channel subsystem has        recognized an overflow condition and event information has been        lost. The overflow condition was recognized while the event        information not contained in the response data area was the most        recently pending information. The overflow does not affect the        information contained in the response data area.    -   Content Code (CC) 864: A value that describes the type of        information that is contained in the response data area. In one        example, the value indicates a storage class memory change        notification in which one or more SCM increments have changed        state or status.    -   Content Code Dependent Field 866: This field may include        additional information regarding the event.

Successful notification of a configuration change may prompt the programto issue the Store SCM Information command to obtain details regardingthe configuration.

In addition to increasing storage class memory, the storage class memorymay be decreased. A Deconfigure Storage Class Memory command requests anamount of storage class memory to be removed from the SCM address spaceof the requesting configuration. An SCM increment to be deconfigured isto be in the configured state.

The SCM increments to be deconfigured are specified in an SCM incrementrequest list, described herein. One or more contiguous SCM incrementsmay be specified in an SCM increment request list entry (SIRLE). Aseparate SIRLE may be specified for each list of increments (a.k.a., anextent) that is not contiguous with any other list of increments.

Regardless of persistence rules, a successful deconfigure of an SCMincrement places the increment into the uninitialized state. Whenzeroing is complete, an SCM increment transitions from the unitializedstate to the initialized state.

One embodiment of a command request block for the Deconfigure StorageClass Memory command is depicted in FIG. 9A. A command request block 900for the Deconfigure Storage Class Memory command includes, for instance:

-   -   Length 902: A value that specifies a length of the command        request block. In one example, the length is 32+(N×16) bytes,        where N is the count of SCM increment request list entries        (SIRLEs).    -   A valid length in this example is evenly divisible by 16 and is        in the range (32+1×16)≦L1≦(32+253×16).    -   Command Code 904: A value that specifies the command code for        the Deconfigure Storage Class Memory command.    -   Format (FMT) 906: A value that specifies the format of the        command request block.    -   Asynchronous Completion Correlator (ACC) 908: A value that is        returned in the asynchronous completion notification, described        above.    -   SCM Increment Request List 910: This field includes an SCM        increment request list (SIRL). An SCM increment request list        includes one or more entries (SIRLEs). The length of the SIRL is        determined from the value of the length field.    -   An SCM increment request list entry (SIRLE) specifies the size        and the location of a specified extent of storage class memory        (e.g., a list of increments). An extent or SCM extent is the        specified size of storage class memory.    -   Referring to FIG. 9B, in one example, a SIRLE 920 includes:    -   Total size (TS) 922: A value that specifies the size of storage        class memory to be deconfigured, encoded as a count of SCM        increments.    -   Starting SCM address (SA) 924: A value that is an SCM address        and is the location in the SCM address space from which to        remove the first or only SCM increment deconfigured by the        SIRLE. Least significant bit positions that would constitute an        offset within the first SCM increment are ignored and assumed to        be zeros, in this example.    -   When total size is greater than one, each additional SCM        increment beyond the first increment is located at an SCM        address that is evenly divisible by the SCM increment size, that        contains a configured SCM increment, and whose location is        contiguous with the last byte of the prior SCM increment. In        other words, in the next, consecutive location.    -   If the space described by the starting address and the total        size, taken together, is not completely full of configured SCM        increments a specified response code is provided, no SCM        increment is deconfigured, no asynchronous process is initiated,        and no subsequent notification occurs.

Upon successful completion, each deconfigured SCM increment has enteredthe reserved state and is then zeroized before being placed into thestandby state.

A command response block for the Deconfigure Storage Class Memorycommand is depicted in FIG. 9C. In one embodiment, a command responseblock 950 includes:

-   -   Length 952: A value that indicates the length of the command        response block.    -   Response Code 954: A value that describes the results of the        attempt to execute the Deconfigure Storage Class Memory command.    -   If a response code of a specified value is stored in the        response code field, an asynchronous process is initiated to        finish processing of the command. If a response code other than        the specified value is stored in the response code field, no SCM        increment is deconfigured, no asynchronous process is initiated,        and no subsequent notification is made. Completion of the        asynchronous process is indicated in the notification response.    -   Before the synchronous part of the Deconfigure Storage Class        Memory command completes with a specified response code, all        entries in the SCM increment request list are examined to ensure        that all specified SCM increments are in the configured state.    -   Format (FMT) 956: A value that indicates the format of the        command response block.

One embodiment of the logic associated with the Deconfigure SCM commandis described with reference to FIGS. 9D-9E.

Initially, the program issues a Channel Subsystem Call instruction thatincludes a Deconfigure SCM command, STEP 970. The request block of theDeconfigure SCM command is obtained by the channel subsystem, STEP 972,and the channel subsystem attempts to execute the command, STEP 974. Ifthe attempt to execute the command produces a response code that doesnot indicate success, INQUIRY 976, then the response code is placed inthe response block of the Deconfigure SCM command, STEP 978, and theresponse block is returned, STEP 980.

If a successful response code is indicated, INQUIRY 976, then theresponse code is placed in the response block, STEP 982, and theresponse block is returned, STEP 984. In this example, a successfulresponse code indicates that the length field of the request block isvalid; the command is available in the system; the command request blockhas a valid format; the channel subsystem is able to perform the command(i.e., not busy); and the SCM increments were originally in theconfigured state.

Additionally, an asynchronous process to complete the deconfiguration isinitiated, STEP 986. Further details regarding this processing isdescribed with reference to FIG. 9E.

In one embodiment, the asynchronous processing performs thedeconfiguration, STEP 990. For instance, the one or more increments aredeallocated. An SCM increment is moved from the configured state to thereserved state. Upon entry of the reserved state, a zeroing processensues, and when complete, the SCM increment transitions to the standbystate. Completion of the asynchronous process is indicated in anotification response, STEP 992.

The notification response data for the Deconfigure Storage Class Memorycommand is returned in the response block of the Store Event Information(SEI) CHSC command. One example of this response block is described withreference to FIG. 8A. However, the content code in this exampleindicates that this is a response to the conclusion of execution of theasynchronous process initiated by the Deconfigure Storage Class Memorycommand request. Similarly, the secondary response code furtherdescribes the results of the attempt to execute the Deconfigure StorageClass Memory command.

In a further embodiment, allocation and deallocation of storageincrements may be requested via a panel presented to a user. Forinstance, a service element is used to provide a graphical interfacethrough which a user may specify parameters to the system. For storageclass memory, a panel called the storage class memory allocation panelallows the user to perform the following operations:

-   -   1. Specify the maximum configurable increments (MCI) for a given        configuration;    -   2. Allocate increments to a configuration;    -   3. Deallocate increments from a configuration.

The panel also allows viewing of configuration increment allocations andMCI, and the number of increments in the available, unavailable, andunitialized pools. When, due to an action at the SE, an incrementsallocation changes or when the size of the one of the pools changes, anotification is sent to the configurations.

Described in detail above is a facility to manage storage class memory.It provides an abstraction to allow the program to access the memorywithout specific knowledge of the memory. In accordance with one or moreaspects of the present invention, a capability is provided to move databetween main storage and SCM; to clear or release SCM; to configure ordeconfigure SCM; and to discovery the configuration of SCM. Othercapabilities are also provided.

In one embodiment, storage class memory is presented as a flat memoryspace to user-level programs, independent of its physical implementationacross multiple devices and I/O adapters.

Details regarding channel subsystems and/or an ADM facility aredescribed in U.S. Pat. No. 5,377,337, entitled “Method and Means forEnabling Virtual Addressing Control By Software Users Over A HardwarePage Transfer Control Entity,” Antognini et al., issued Dec. 27, 1994;U.S. Serial No. 5,442,802, entitled “Asynchronous Co-Processor DataMover Method and Means,” Brent et al., issued Aug. 15, 1995; and U.S.Pat. No. 5,526,484, entitled “Method and System for Pipelining theProcessing of Channel Command Words,” issued Jun. 11, 1996, each ofwhich is hereby incorporated herein by reference in its entirety.

Additionally, further information relating to a channel subsystem andinstructions associated therewith (for a particular implementation ofthe z/Architecture®) is provided below:

Input/Output (I/O)

The terms “input” and “output” are used to describe the transfer of databetween I/O devices and main storage. An operation involving this kindof transfer is referred to as an I/O operation. The facilities used tocontrol I/O operations are collectively called the channel subsystem.(I/O devices and their control units attach to the channel subsystem.)

The Channel Subsystem

The channel subsystem directs the flow of information between I/Odevices and main storage. It relieves CPUs of the task of communicatingdirectly with I/O devices and permits data processing to proceedconcurrently with I/O processing. The channel subsystem uses one or morechannel paths as the communication link in managing the flow ofinformation to or from I/O devices. As part of I/O processing, thechannel subsystem also performs a path-management operation by testingfor channel-path availability, chooses an available channel path, andinitiates the performance of the I/O operation by the device.

Within the channel subsystem are subchannels. One subchannel is providedfor and dedicated to each I/O device accessible to the program throughthe channel subsystem.

The multiple-subchannel-set facility is an optional facility. When it isinstalled, subchannels are partitioned into multiple subchannel sets,and each subchannel set may provide one dedicated subchannel to an I/Odevice. Depending on the model and the interface used, some I/O devicesmay only be allowed to be accessed via certain subchannel sets.

Each subchannel provides information concerning the associated I/Odevice and its attachment to the channel subsystem. The subchannel alsoprovides information concerning I/O operations and other functionsinvolving the associated I/O device. The subchannel is the means bywhich the channel subsystem provides information about associated I/Odevices to CPUs, which obtain this information by executing I/Oinstructions. The actual number of subchannels provided depends on themodel and the configuration; the maximum addressability is 0-65,535 ineach subchannel set.

I/O devices are attached through control units to the channel subsystemby means of channel paths. Control units may be attached to the channelsubsystem by more than one channel path, and an I/O device may beattached to more than one control unit. In all, an individual I/O devicemay be accessible to the channel subsystem by as many as eight differentchannel paths via a subchannel, depending on the model and theconfiguration. The total number of channel paths provided by a channelsubsystem depends on the model and the configuration; the maximumaddressability is 0-255.

The performance of a channel subsystem depends on its use and on thesystem model in which it is implemented. Channel paths are provided withdifferent data-transfer capabilities, and an I/O device designed totransfer data only at a specific rate (a magnetic-tape unit or a diskstorage, for example) can operate only on a channel path that canaccommodate at least this data rate.

The channel subsystem contains common facilities for the control of I/Ooperations. When these facilities are provided in the form of separate,autonomous equipment designed specifically to control I/O devices, I/Ooperations are completely overlapped with the activity in CPUs. The onlymain-storage cycles required by the channel subsystem during I/Ooperations are those needed to transfer data and control information toor from the final locations in main storage, along with those cyclesthat may be required for the channel subsystem to access the subchannelswhen they are implemented as part of nonaddressable main storage. Thesecycles do not delay CPU programs, except when both the CPU and thechannel subsystem concurrently attempt to reference the samemain-storage area.

Subchannel Sets

When the multiple-subchannel-set facility is installed, subchannels arepartitioned into multiple subchannel sets. There may be up to foursubchannel sets, each identified by a subchannel-set identifier (SSID).When the multiple-subchannel-set facility is not installed, there isonly one subchannel set with an SSID of zero. When themultiple-subchannel-set facility is not enabled, only subchannel setzero is visible to the program.

Subchannels

A subchannel provides the logical appearance of a device to the programand contains the information required for sustaining a single I/Ooperation. The subchannel consists of internal storage that containsinformation in the form of a channel-program designation, channel-pathidentifier, device number, count, status indications, andI/O-interruption-subclass code, as well as information on pathavailability and functions pending or being performed. I/O operationsare initiated with a device by the execution of I/O instructions thatdesignate the subchannel associated with the device.

Each device is accessible by means of one subchannel in each channelsubsystem to which it is assigned during configuration at installationtime. The device may be a physically identifiable unit or may be housedinternal to a control unit. For example, in certain disk-storagedevices, each actuator used in retrieving data is considered to be adevice. In all cases, a device, from the point of view of the channelsubsystem, is an entity that is uniquely associated with one subchanneland that responds to selection by the channel subsystem by using thecommunication protocols defined for the type of channel path by which itis accessible.

On some models, subchannels are provided in blocks. On these models,more subchannels may be provided than there are attached devices.Subchannels that are provided but do not have devices assigned to themare not used by the channel subsystem to perform any function and areindicated by storing the associated device-number-valid bit as zero inthe subchannel-information block of the subchannel.

The number of subchannels provided by the channel subsystem isindependent of the number of channel paths to the associated devices.For example, a device accessible through alternate channel paths stillis represented by a single subchannel. Each subchannel is addressed byusing a 16-bit binary subchannel number and a two-bit SSID when thesubchannel-set facility is installed.

After I/O processing at the subchannel has been requested by theexecution of START SUBCHANNEL, the CPU is released for other work, andthe channel subsystem assembles or disassembles data and synchronizesthe transfer of data bytes between the I/O device and main storage. Toaccomplish this, the channel subsystem maintains and updates an addressand a count that describe the destination or source of data in mainstorage. Similarly, when an I/O device provides signals that should bebrought to the attention of the program, the channel subsystemtransforms the signals into status information and stores theinformation in the subchannel, where it can be retrieved by the program.

Attachment of Input/Output Devices

Channel Paths

The channel subsystem communicates with I/O devices by means of channelpaths between the channel subsystem and control units. A control unitmay be accessible by the channel subsystem by more than one channelpath. Similarly, an I/O device may be accessible by the channelsubsystem through more than one control unit, each having one or morechannel paths to the channel subsystem.

Devices that are attached to the channel subsystem by multiple channelpaths configured to a subchannel, may be accessed by the channelsubsystem using any of the available channel paths. Similarly, a devicehaving the dynamic-reconnection feature and operating in the multipathmode can be initialized to operate such that the device may choose anyof the available channel paths configured to the subchannel, whenlogically reconnecting to the channel subsystem to continue a chain ofI/O operations.

The channel subsystem may contain more than one type of channel path.Examples of channel-path types used by the channel subsystem are theESCON I/O interface, FICON I/O interface, FICON-converted I/O interface,and IBM System/360 and System/370 I/O interface. The term “serial-I/Ointerface” is used to refer the ESCON I/O interface, the FICON I/Ointerface, and the FICON-converted I/O interface. The term “parallel-I/Ointerface” is used to refer to the IBM System/360 and System/370 I/Ointerface.

The ESCON I/O interface is described in the System Library publicationIBM Enterprise Systems Architecture/390 ESCON I/O Interface, SA22-7202,which is hereby incorporated herein by reference in its entirety.

The FICON I/O interface is described in the ANSI standards documentFibre Channel-Single-Byte Command Code Sets-2 (FC-SB-2).

The IBM System/360 and System/370 I/O interface is described in theSystem Library publication IBM System/360 and System/370 I/O InterfaceChannel to Control Unit OEMI, GA22-6974, which is hereby incorporatedherein by reference in its entirety.

Depending on the type of channel path, the facilities provided by thechannel path, and the I/O device, an I/O operation may occur in one ofthree modes, frame-multiplex mode, burst mode, or byte-multiplex mode.

In the frame-multiplex mode, the I/O device may stay logically connectedto the channel path for the duration of the execution of a channelprogram. The facilities of a channel path capable of operating in theframe-multiplex mode may be shared by a number of concurrently operatingI/O devices. In this mode the information required to complete an I/Ooperation is divided into frames that may be interleaved with framesfrom I/O operations for other I/O devices. During this period, multipleI/O devices are considered to be logically connected to the channelpath.

In the burst mode, the I/O device monopolizes a channel path and stayslogically connected to the channel path for the transfer of a burst ofinformation. No other device can communicate over the channel pathduring the time a burst is transferred. The burst can consist of a fewbytes, a whole block of data, a sequence of blocks with associatedcontrol and status information (the block lengths may be zero), orstatus information that monopolizes the channel path. The facilities ofthe channel path capable of operating in the burst mode may be shared bya number of concurrently operating I/O devices.

Some channel paths can tolerate an absence of data transfer for about ahalf minute during a burst-mode operation, such as occurs when a longgap on magnetic tape is read. An equipment malfunction may be indicatedwhen an absence of data transfer exceeds the prescribed limit.

In the byte-multiplex mode, the I/O device stays logically connected tothe channel path only for a short interval of time. The facilities of achannel path capable of operating in the byte-multiplex mode may beshared by a number of concurrently operating I/O devices. In this mode,all I/O operations are split into short intervals of time during whichonly a segment of information is transferred over the channel path.During such an interval, only one device and its associated subchannelare logically connected to the channel path. The intervals associatedwith the concurrent operation of multiple I/O devices are sequenced inresponse to demands from the devices. The channel-subsystem facilityassociated with a subchannel exercises its controls for any oneoperation only for the time required to transfer a segment ofinformation. The segment can consist of a single byte of data, a fewbytes of data, a status report from the device, or a control sequenceused for the initiation of a new operation.

Ordinarily, devices with high data-transfer-rate requirements operatewith the channel path in the frame-multiplex mode, slower devicesoperate in the burst mode, and the slowest devices operate in thebyte-multiplex mode. Some control units have a manual switch for settingthe desired mode of operation.

An I/O operation that occurs on a parallel-I/O-interface type of channelpath may occur in either the burst mode or the byte-multiplex modedepending on the facilities provided by the channel path and the I/Odevice. For improved performance, some channel paths and control unitsare provided with facilities for high-speed transfer and data streamingSee the System Library publication IBM System/360 and System/370 I/OInterface Channel to Control Unit OEMI, GA22-6974, for a description ofthose two facilities, which is hereby incorporated herein by referencein its entirety.

An I/O operation that occurs on a serial-I/O-interface-type of channelpath may occur in either the frame-multiplex mode or the burst mode. Forimproved performance, some control units attaching to the serial-I/Ointerface provide the capability to provide sense data to the programconcurrent with the presentation of unit-check status, if permitted todo so by the program.

Depending on the control unit or channel subsystem, access to a devicethrough a subchannel may be restricted to a single channel-path type.

The modes and features described above affect only the protocol used totransfer information over the channel path and the speed oftransmission. No effects are observable by CPU or channel programs withrespect to the way these programs are executed.

Control Units

A control unit provides the logical capabilities necessary to operateand control an I/O device and adapts the characteristics of each deviceso that it can respond to the standard form of control provided by thechannel subsystem.

Communication between the control unit and the channel subsystem takesplace over a channel path. The control unit accepts control signals fromthe channel subsystem, controls the timing of data transfer over thechannel path, and provides indications concerning the status of thedevice.

The I/O device attached to the control unit may be designed to performonly certain limited operations, or it may perform many differentoperations. A typical operation is moving a recording medium andrecording data. To accomplish its operations, the device needs detailedsignal sequences peculiar to its type of device. The control unitdecodes the commands received from the channel subsystem, interpretsthem for the particular type of device, and provides the signal sequencerequired for the performance of the operation.

A control unit may be housed separately, or it may be physically andlogically integrated with the I/O device, the channel subsystem, or aCPU. In the case of most electromechanical devices, a well-definedinterface exists between the device and the control unit because of thedifference in the type of equipment the control unit and the devicerequire. These electromechanical devices often are of a type where onlyone device of a group attached to a control unit is required to transferdata at a time (magnetic-tape units or disk-access mechanisms, forexample), and the control unit is shared among a number of I/O devices.On the other hand, in some electronic I/O devices, such as thechannel-to-channel adapter, the control unit does not have an identityof its own.

From the programmer's point of view, most functions performed by thecontrol unit can be merged with those performed by the I/O device.Therefore, normally no specific mention of the control-unit function ismade in this description; the performance of I/O operations is describedas if the I/O devices communicated directly with the channel subsystem.Reference is made to the control unit only when emphasizing a functionperformed by it or when describing how the sharing of the control unitamong a number of devices affects the performance of I/O operations.

I/O Devices

An input/output (I/O) device provides external storage, a means ofcommunication between data-processing systems, or a means ofcommunication between a system and its environment. I/O devices includesuch equipment as magnetic-tape units, direct-access-storage devices(for example, disks), display units, typewriter-keyboard devices,printers, teleprocessing devices, and sensor-based equipment. An I/Odevice may be physically distinct equipment, or it may share equipmentwith other I/O devices.

Most types of I/O devices, such as printers, or tape devices, useexternal media, and these devices are physically distinguishable andidentifiable. Other types are solely electronic and do not directlyhandle physical recording media. The channel-to-channel adapter, forexample, provides for data transfer between two channel paths, and thedata never reaches a physical recording medium outside main storage.Similarly, communication controllers may handle the transmission ofinformation between the data-processing system and a remote station, andits input and output are signals on a transmission line.

In the simplest case, an I/O device is attached to one control unit andis accessible from one channel path. Switching equipment is available tomake some devices accessible from two or more channel paths by switchingdevices among control units and by switching control units among channelpaths. Such switching equipment provides multiple paths by which an I/Odevice may be accessed. Multiple channel paths to an I/O device areprovided to improve performance or I/O availability, or both, within thesystem. The management of multiple channel paths to devices is under thecontrol of the channel subsystem and the device, but the channel pathsmay indirectly be controlled by the program.

I/O Addressing

Four different types of I/O addressing are provided by the channelsubsystem for the necessary addressing of the various components:channel-path identifiers, subchannel numbers, device numbers, and,though not visible to programs, addresses dependent on the channel-pathtype. When the multiple-subchannel-set facility is installed, thesubchannel-set identifier (SSID) is also used in I/O addressing.

Subchannel-Set Identifier

The subchannel-set identifier (SSID) is a two-bit value assigned to eachprovided subchannel set.

Channel-Path Identifier

The channel-path identifier (CHPID) is a system-unique eight-bit valueassigned to each installed channel path of the system. A CHPID is usedto address a channel path. A CHPID is specified by the second-operandaddress of RESET CHANNEL PATH and used to designate the channel paththat is to be reset. The channel paths by which a device is accessibleare identified in the subchannel-information block (SCHIB), each by itsassociated CHPID, when STORE SUBCHANNEL is executed. The CHPID can alsobe used in operator messages when it is necessary to identify aparticular channel path. A system model may provide as many as 256channel paths. The maximum number of channel paths and the assignment ofCHPIDs to channel paths depends on the system model.

Subchannel Number

A subchannel number is a system-unique 16-bit value used to address asubchannel. This value is unique within a subchannel set of a channelsubsystem. The subchannel is addressed by eight I/O instructions: CANCELSUBCHANNEL, CLEAR SUBCHANNEL, HALT SUBCHANNEL, MODIFY SUBCHANNEL, RESUMESUBCHANNEL, START SUBCHANNEL, STORE SUBCHANNEL, and TEST SUBCHANNEL. AllI/O functions relative to a specific I/O device are specified by theprogram by designating a subchannel assigned to the I/O device.Subchannels in each subchannel set are always assigned subchannelnumbers within a single range of contiguous numbers. The lowest-numberedsubchannel is subchannel 0. The highest-numbered subchannel of thechannel subsystem has a subchannel number equal to one less than thenumber of subchannels provided. A maximum of 65,536 subchannels can beprovided in each subchannel set. Normally, subchannel numbers are onlyused in communication between the CPU program and the channel subsystem.

Device Number

Each subchannel that has an I/O device assigned to it also contains aparameter called the device number. The device number is a 16-bit valuethat is assigned as one of the parameters of the subchannel at the timethe device is assigned to the subchannel. The device number uniquelyidentifies a device to the program.

The device number provides a means to identify a device, independent ofany limitations imposed by the system model, the configuration, orchannel-path protocols. The device number is used in communicationsconcerning the device that take place between the system and the systemoperator. For example, the device number is entered by the systemoperator to designate the input device to be used for initial programloading.

Programming Note:

The device number is assigned at device-installation time and may haveany value. However, the user must observe any restrictions ondevice-number assignment that may be required by the control program,support programs, or the particular control unit or I/O device.

Device Identifier

A device identifier is an address, not apparent to the program, that isused by the channel subsystem to communicate with I/O devices. The typeof device identifier used depends on the specific channel-path type andthe protocols provided. Each subchannel contains one or more deviceidentifiers.

For a channel path of the parallel-I/O-interface type, the deviceidentifier is called a device address and consists of an eight-bitvalue. For the ESCON I/O interface, the device identifier consists of afour-bit control-unit address and an eight-bit device address. For theFICON I/O interface, the device identifier consists of an eight-bitcontrol-unit-image ID and an eight-bit device address. For theFICON-converted I/O interface, the device identifier consists of afour-bit control-unit address and an eight-bit device address.

The device address identifies the particular I/O device (and, on theparallel-I/O interface, the control unit) associated with a subchannel.The device address may identify, for example, a particular magnetic-tapedrive, disk-access mechanism, or transmission line. Any number in therange 0-255 can be assigned as a device address.

Fibre-Channel Extensions

The fibre-channel-extensions (FCX) facility is an optional facility thatprovides for the formation of a channel program that is composed of atransport-control word (TCW) that designates a transport-command-controlblock (TCCB) and a transport-status block (TSB). The TCCB includes atransport-command area (TCA) which contains a list of up to 30 I/Ocommands that are in the form of device-command words (DCWs). A TCW andits TCCB may specify either a read or a write operation. In addition tothe IRB, the TSB contains the completion status and other informationrelated to the TCW channel program.

The FCX facility provides the ability to directly or indirectlydesignate any or all of the TCCB, the input data storage area, and theoutput data storage area. When a storage area is designated directly,the TCW specifies the location of a single, contiguous block of storage.When a storage area is designated indirectly, the TCW designates thelocation of a list of one or more transport-indirect-data-address words(TIDAWs). TIDAW lists and the storage area designated by each TIDAW in alist are restricted from crossing 4K-byte boundaries

The FCX facility also provides an interrogate operation that may beinitiated by the CANCEL SUBCHANNEL instruction to determine the state ofan I/O operation.

I/O-Command Words

An I/O-command word specifies a command and contains informationassociated with the command. When the FCX facility is installed, thereare two elemental forms of I/O command words which are thechannel-command word (CCW) and the device-command word (DCW).

A CCW is 8-bytes in length and specifies the command to be executed. Forcommands that initiate certain operations the CCW also designates thestorage area associated with the operation, the count of data bytes, theaction to be taken when the command completes, and other options. AllI/O devices recognize CCWs.

A DCW is 8-bytes in length and specifies the command to be executed. thecount of data bytes, and other options. I/O devices that support FCXrecognize DCWs.

Transport Command Word (TCW)

A TCW designates a transport-command-control block (TCCB) which containsa list of commands to be transported to and executed by an I/O device.The TCW also designates the storage areas for the commands in the TCCBas well as a transport-status block (TSB) to contain the status of theI/O operation.

Channel Program Organization

When the FCX facility is not installed, there is a single form ofchannel program which is the CCW channel program. When the FCX facilityis installed, there is an additional form of channel program which isthe TCW channel program. Both forms of channel programs are describedbelow.

CCW Channel Program

A channel program that is composed of one or more CCWs is called a CCWchannel program (CCP). Such a channel program contains one or more CCWsthat are logically linked and arranged for sequential execution by thechannel subsystem.

TCW Channel Program

A channel program that is composed of a single TCW is called a TCWchannel program. A TCW designates a transport-command-control block(TCCB) that contains from 1 to 30 DCWs. The DCWs within the TCCB arelogically linked and arranged for sequential execution. For DCWs thatspecify control information, the TCCB also contains the controlinformation for those commands. The TCW also designates the storage areaor areas for the DCWs that specify the transfer of data from or to thedevice and the location of a transport-status block (TSB) for completionstatus. The TCCB and the storage areas for the transfer of data may bespecified as either contiguous or noncontiguous storage.

The TCW also designates a TSB for completion status.

Execution of I/O Operations

I/O operations are initiated and controlled by information with fourtypes of formats: the instruction START SUBCHANNEL, transport-commandwords, I/O-command words, and orders. The START SUBCHANNEL instructionis executed by a CPU and is part of the CPU program that supervises theflow of requests for I/O operations from other programs that manage orprocess the I/O data.

When START SUBCHANNEL is executed, parameters are passed to the targetsubchannel requesting that the channel subsystem perform a startfunction with the I/O device associated with the subchannel. The channelsubsystem performs the start function by using information at thesubchannel, including the information passed during the execution of theSTART SUBCHANNEL instruction, to find an accessible channel path to thedevice. Once the device has been selected, the execution of an I/Ooperation is accomplished by the decoding and execution of a CCW by thechannel subsystem and the I/O device, for CCW channel programs, or forTCW channel programs, by transporting the TCCB to the I/O device by thechannel subsystem and the decoding and execution of a DCW by the device.I/O-command words, and transport-command words are fetched from mainstorage, although the modifier bits in the command code of a CCW DCW mayspecify device-dependent conditions for the execution of an operation atthe device.

Operations peculiar to a device, such as rewinding tape or positioningthe access mechanism on a disk drive, are specified by orders that aredecoded and executed by I/O devices. Orders may be transferred to thedevice as modifier bits in the command code of a control command, may betransferred to the device as data during a control or write operation,or may be made available to the device by other means.

Start-Function Initiation

CPU programs initiate I/O operations with the instruction STARTSUBCHANNEL. This instruction passes the contents of an operation-requestblock (ORB) to the subchannel.

If the ORB specifies a CCW channel program, the contents of the ORBinclude the subchannel key, the address of the first CCW to be executed,and a specification of the format of the CCWs. The CCW specifies thecommand to be executed and the storage area, if any, to be used. If theORB specifies a TCW channel program, the contents of the ORB include thesubchannel key and the address of the TCW to be executed. The TCWdesignates the TCCB which contains the commands to be transported to thedevice for execution, the storage area or areas, if any, to be used fordata transfer, and the TSB to contain the status of the I/O operation.

When the ORB contents have been passed to the subchannel, the executionof START SUBCHANNEL is complete. The results of the execution of theinstruction are indicated by the condition code set in theprogram-status word.

When facilities become available and the ORB specifies a CCW channelprogram, the channel subsystem fetches the first CCW and decodes itaccording to the format bit specified in the ORB. If the format bit iszero, format-0 CCWs are specified. If the format bit is one, format-1CCWs are specified. Format-0 and format-1 CCWs contain the sameinformation, but the fields are arranged differently in the format-1 CCWso that 31-bit addresses can be specified directly in the CCW. Whenfacilities become available and the ORB specifies a TCW channel program,the channel subsystem fetches the designated TCW and transports thedesignated TCCB to the device. Storage areas designated by the TCW forthe transfer of data to or from the device are 64-bit addresses.

Subchannel Operation Modes

There are two modes of subchannel operation. A subchannel enterstransport mode when the FCX facility is installed and the start functionis set at the subchannel as the result of the execution of a STARTSUBCHANNEL instruction that specifies a TCW channel program. Thesubchannel remains in transport mode until the start function is resetat the subchannel. At all other times, the subchannel is in commandmode.

Path Management

If ORB specifies a CCW channel program and the first CCW passes certainvalidity tests and does not have the suspend flag specified as one or ifthe ORB specifies a TCW channel program and the designated TCW passescertain validity tests, the channel subsystem attempts device selectionby choosing a channel path from the group of channel paths that areavailable for selection. A control unit that recognizes the deviceidentifier connects itself logically to the channel path and responds toits selection.

If the ORB specifies a CCW channel program, the channel subsystem sendsthe command-code part of the CCW over the channel path, and the deviceresponds with a status byte indicating whether the command can beexecuted. The control unit may logically disconnect from the channelpath at this time, or it may remain connected to initiate data transfer.

If the ORB specifies a TCW channel program, the channel subsystem usesinformation in the designated TCW to transfer the TCCB to the controlunit. The contents of the TCCB are ignored by the channel subsystem andonly have meaning to the control unit and I/O device.

If the attempted selection does not occur as a result of either a busyindication or a path-not-operational condition, the channel subsystemattempts to select the device by an alternate channel path if one isavailable. When selection has been attempted on all paths available forselection and the busy condition persists, the operation remains pendinguntil a path becomes free. If a path-not-operational condition isdetected on one or more of the channel paths on which device selectionwas attempted, the program is alerted by a subsequent I/O interruption.The I/O interruption occurs either upon execution of the channel program(assuming the device was selected on an alternate channel path) or as aresult of the execution being abandoned because path-not-operationalconditions were detected on all of the channel paths on which deviceselection was attempted.

Channel-Program Execution

If the command is initiated at the device and command execution does notrequire any data to be transferred to or from the device, the device maysignal the end of the operation immediately on receipt of the commandcode. In operations that involve the transfer of data, the subchannel isset up so that the channel subsystem will respond to service requestsfrom the device and assume further control of the operation.

An I/O operation may involve the transfer of data to or from one storagearea, designated by a single CCW or TCW or to or from a number ofnoncontiguous storage areas. In the latter case, generally a list ofCCWs is used for the execution of the I/O operation, with each CCWdesignating a contiguous storage area and the CCWs are coupled by datachaining. Data chaining is specified by a flag in the CCW and causes thechannel subsystem to fetch another CCW upon the exhaustion or filling ofthe storage area designated by the current CCW. The storage areadesignated by a CCW fetched on data chaining pertains to the I/Ooperation already in progress at the I/O device, and the I/O device isnot notified when a new CCW is fetched.

Provision is made in the CCW format for the programmer to specify that,when the CCW is decoded, the channel subsystem request an I/Ointerruption as soon as possible, thereby notifying a CPU program thatchaining has progressed at least as far as that CCW in the channelprogram.

To complement dynamic address translation in CPUs, CCW indirect dataaddressing and modified CCW indirect data addressing are provided.

When the ORB specifies a CCW channel program and CCW-indirect-dataaddressing is used, a flag in the CCW specifies that anindirect-data-address list is to be used to designate the storage areasfor that CCW. Each time the boundary of a block of storage is reached,the list is referenced to determine the next block of storage to beused. The ORB specifies whether the size of each block of storage is 2Kbytes or 4K bytes.

When the ORB specifies a CCW channel program andmodified-CCW-indirect-data addressing is used, a flag in the ORB and aflag in the CCW specify that a modified-indirect-data-address list is tobe used to designate the storage areas for that CCW. Each time the countof bytes specified for a block of storage is reached, the list isreferenced to determine the next block of storage to be used. Unlikewhen indirect data addressing is used, the block may be specified on anyboundary and length up to 4K, provided a data transfer across a 4K-byteboundary is not specified.

When the ORB specifies a TCW channel program and transport-indirect-dataaddressing is used, flags in the TCW specify whether atransport-indirect-data-address list is to be used to designate thestorage areas containing the TCCB and whether atransport-indirect-data-address list is used to designate the datastorage areas associated with the DCWs in the TCCB. Each time the countof bytes specified for a block of storage is reached, the correspondingtransport-indirect-data-address list is referenced to determine the nextstorage block to be used.

CCW indirect data addressing and modified CCW indirect data addressingpermit essentially the same CCW sequences to be used for a programrunning with dynamic address translation active in the CPU as would beused if the CPU were operating with equivalent contiguous real storage.CCW indirect data addressing permits the program to designate datablocks having absolute storage addresses up to 2⁶⁴−1 independent ofwhether format-0 or format-1 CCWs have been specified in the ORB.Modified CCW indirect data addressing permits the program to designatedata blocks having absolute storage addresses up to 2⁶⁴−1, independentof whether format-0 or format-1 CCWs have been specified in the ORB.

In general, the execution of an I/O operation or chain of operationsinvolves as many as three levels of participation:

1. Except for effects due to the integration of CPU andchannel-subsystem equipment, a CPU is busy for the duration of theexecution of START SUBCHANNEL, which lasts until the addressedsubchannel has been passed the ORB contents.

2. The subchannel is busy for a new START SUBCHANNEL from the receipt ofthe ORB contents until the primary interruption condition is cleared atthe subchannel.

3. The I/O device is busy from the initiation of the first operation atthe device until either the subchannel becomes suspended or thesecondary interruption condition is placed at the subchannel. In thecase of a suspended subchannel, the device again becomes busy when theexecution of the suspended channel program is resumed.

Conclusion of I/O Operations

The conclusion of an I/O operation normally is indicated by two statusconditions: channel end and device end. The channel-end conditionindicates that the I/O device has received or provided all dataassociated with the operation and no longer needs channel-subsystemfacilities. This condition is called the primary interruption condition,and the channel end in this case is the primary status. Generally, theprimary interruption condition is any interruption condition thatrelates to an I/O operation and that signals the conclusion at thesubchannel of the I/O operation or chain of I/O operations.

The device-end signal indicates that the I/O device has concludedexecution and is ready to perform another operation. This condition iscalled the secondary interruption condition, and the device end in thiscase is the secondary status. Generally, the secondary interruptioncondition is any interruption condition that relates to an I/O operationand that signals the conclusion at the device of the I/O operation orchain of operations. The secondary interruption condition can occurconcurrently with, or later than, the primary interruption condition.

Concurrent with the primary or secondary interruption conditions, boththe channel subsystem and the I/O device can provide indications ofunusual situations.

The conditions signaling the conclusion of an I/O operation can bebrought to the attention of the program by I/O interruptions or, whenthe CPUs are disabled for I/O interruptions, by programmed interrogationof the channel subsystem. In the former case, these conditions causestoring of the I/O-interruption code, which contains informationconcerning the interrupting source. In the latter case, the interruptioncode is stored as a result of the execution of TEST PENDINGINTERRUPTION.

When the primary interruption condition is recognized, the channelsubsystem attempts to notify the program, by means of an interruptionrequest, that a subchannel contains information describing theconclusion of an I/O operation at the subchannel. For command-modeinterruptions, the information identifies the last CCW used and mayprovide its residual byte count, thus describing the extent of mainstorage used. For transport-mode interruptions, the informationidentifies the current TCW and the TSB associated with the channelprogram that contains additional status about the I/O operation, such asresidual byte count. In addition to information about the channelprogram, both the channel subsystem and the I/O device may provideadditional indications of unusual conditions as part of either theprimary or the secondary interruption condition. The informationcontained at the subchannel may be stored by the execution of TESTSUBCHANNEL or the execution of STORE SUBCHANNEL. This information, whenstored, is called a subchannel-status word (SCSW).

Chaining when Using a CCW Channel Program

When the ORB specifies a CCW channel program, facilities are providedfor the program to initiate the execution of a chain of I/O operationswith a single START SUBCHANNEL instruction. When the current CCWspecifies command chaining and no unusual conditions have been detectedduring the operation, the receipt of the device-end signal causes thechannel subsystem to fetch a new CCW. If the CCW passes certain validitytests and the suspend flag is not specified as a one in the new CCW,execution of a new command is initiated at the device. If the CCW failsto pass the validity tests, the new command is not initiated, commandchaining is suppressed, and the status associated with the new CCWcauses an interruption condition to be generated. If the suspend flag isspecified as a one and this value is valid because of a one value in thesuspend control, bit 4 of word 1 of the associated ORB, execution of thenew command is not initiated, and command chaining is concluded.

Execution of the new command is initiated by the channel subsystem inthe same way as in the previous operation. The ending signals occurringat the conclusion of an operation caused by a CCW specifying commandchaining are not made available to the program. When another I/Ooperation is initiated by command chaining, the channel subsystemcontinues execution of the channel program. If, however, an unusualcondition has been detected, command chaining is suppressed, the channelprogram is terminated, an interruption condition is generated, and theending signals causing the termination are made available to theprogram.

The suspend-and-resume function provides the program with control overthe execution of a channel program. The initiation of the suspendfunction is controlled by the setting of the suspend-control bit in theORB. The suspend function is signaled to the channel subsystem duringchannel-program execution when the suspend-control bit in the ORB is oneand the suspend flag in the first CCW or in a CCW fetched during commandchaining is one.

Suspension occurs when the channel subsystem fetches a CCW with thesuspend flag validly (because of a one value of the suspend-control bitin the ORB) specified as one. The command in this CCW is not sent to theI/O device, and the device is signaled that the chain of commands isconcluded. A subsequent RESUME SUBCHANNEL instruction informs thechannel subsystem that the CCW that caused suspension may have beenmodified and that the channel subsystem must refetch the CCW and examinethe current setting of the suspend flag. If the suspend flag is found tobe zero in the CCW, the channel subsystem resumes execution of the chainof commands with the I/O device.

Chaining when Using a TCW Channel Program

When the ORB specifies a TCW channel program, facilities are alsoprovided for the program to initiate the execution of a chain of deviceoperations with a single START SUBCHANNEL instruction. Command chainingmay be specified for those DCWs designated by a single TCW. When thecurrent DCW specifies command chaining and no unusual conditions havebeen detected during the operation, recognition of the successfulexecution of the DCW causes the next DCW in the current TCCB to beprocessed.

If the next DCW passes certain validity tests, execution of a newcommand is initiated at the device and the DCW becomes the current DCW.If the DCW fails to pass the validity tests, the new command is notinitiated, command chaining is suppressed, the channel program isterminated, and the status associated with the new DCW causes aninterruption condition to be generated.

Execution of the new command is initiated in the same way as in theprevious operation. The ending signals occurring at the conclusion of anoperation caused by a DCW that is not the last specified DCW are notmade available to the program. When another I/O operation is initiatedby command chaining, execution of the channel program continues. If,however, an unusual condition has been detected, command chaining issuppressed, the channel program is terminated, an interruption conditionis generated, and status is made available to the program thatidentifies the unusual condition.

Premature Conclusion of I/O Operations

Channel-program execution may be terminated prematurely by CANCELSUBCHANNEL, HALT SUBCHANNEL or CLEAR SUBCHANNEL. The execution of CANCELSUBCHANNEL causes the channel subsystem to terminate the start functionat the subchannel if the channel program has not been initiated at thedevice. When the start function is terminated by the execution of CANCELSUBCHANNEL, the channel subsystem sets condition code 0 in response tothe CANCEL SUBCHANNEL instruction. The execution of HALT SUBCHANNELcauses the channel subsystem to issue the halt signal to the I/O deviceand terminate channel-program execution at the subchannel. Whenchannel-program execution is terminated by the execution of HALTSUBCHANNEL, the program is notified of the termination by means of anI/O-interruption request. When the subchannel is in command mode, theinterruption request is generated when the device presents status forthe terminated operation. When the subchannel is in transport mode, theinterruption request is generated immediately. If, however, the haltsignal was issued to the device during command chaining after thereceipt of device end but before the next command was transferred to thedevice, the interruption request is generated after the device has beensignaled. In the latter case, the device-status field of the SCSW willcontain zeros. The execution of CLEAR SUBCHANNEL clears the subchannelof indications of the channel program in execution, causes the channelsubsystem to issue the clear signal to the I/O device, and causes thechannel subsystem to generate an I/O-interruption request to notify theprogram of the completion of the clear function.

I/O Interruptions

Conditions causing I/O-interruption requests are asynchronous toactivity in CPUs, and more than one condition can occur at the sametime. The conditions are preserved at the subchannels until cleared byTEST SUBCHANNEL or CLEAR SUBCHANNEL, or reset by an I/O-system reset.

When an I/O-interruption condition has been recognized by the channelsubsystem and indicated at the subchannel, an I/O-interruption requestis made pending for the I/O-interruption subclass specified at thesubchannel. The I/O-interruption subclass for which the interruption ismade pending is under programmed control through the use of MODIFYSUBCHANNEL. A pending I/O interruption may be accepted by any CPU thatis enabled for interruptions from its I/O-interruption subclass. EachCPU has eight mask bits, in control register 6, that control theenablement of that CPU for each of the eight I/O-interruptionsubclasses, with the I/O mask, bit 6 in the PSW, being the masterI/O-interruption mask for the CPU.

When an I/O interruption occurs at a CPU, the I/O-interruption code isstored in the I/O-communication area of that CPU, and theI/O-interruption request is cleared. The I/O-interruption codeidentifies the subchannel for which the interruption was pending. Theconditions causing the generation of the interruption request may thenbe retrieved from the subchannel explicitly by TEST SUBCHANNEL or bySTORE SUBCHANNEL.

A pending I/O-interruption request may also be cleared by TEST PENDINGINTERRUPTION when the corresponding I/O-interruption subclass is enabledbut the PSW has I/O interruptions disabled or by TEST SUBCHANNEL whenthe CPU is disabled for I/O interruptions from the correspondingI/O-interruption subclass. A pending I/O-interruption request may alsobe cleared by CLEAR SUBCHANNEL. Both CLEAR SUBCHANNEL and TESTSUBCHANNEL clear the preserved interruption condition at the subchannelas well.

Normally, unless the interruption request is cleared by CLEARSUBCHANNEL, the program issues TEST SUBCHANNEL to obtain informationconcerning the execution of the operation.

Clear Subchannel

The designated subchannel is cleared, the current start or haltfunction, if any, is terminated at the designated subchannel, and thechannel subsystem is signaled to asynchronously perform the clearfunction at the designated subchannel and at the associated device.

General register 1 contains a subsystem-identification word (SID) thatdesignates the subchannel to be cleared.

If a start or halt function is in progress, it is terminated at thesubchannel.

The subchannel is made no longer status pending. All activity, asindicated in the activity-control field of the SCSW, is cleared at thesubchannel, except that the subchannel is made clear pending. Anyfunctions in progress, as indicated in the function-control field of theSCSW, are cleared at the subchannel, except for the clear function thatis to be performed because of the execution of this instruction.

When the subchannel is operating in transport mode and condition code 2is set, the CPU may signal the channel subsystem to asynchronouslyperform the interrogate function, and end the instruction.

The channel subsystem is signaled to asynchronously perform the clearfunction. The clear function is summarized below in the section“Associated Functions” and is described in detail in thereafter.

Condition code 0 is set to indicate that the actions described abovehave been taken.

Associated Functions

Subsequent to the execution of CLEAR SUBCHANNEL, the channel subsystemasynchronously performs the clear function. If conditions allow, thechannel subsystem chooses a channel path and attempts to issue the clearsignal to the device to terminate the I/O operation, if any. Thesubchannel then becomes status pending. Conditions encountered by thechannel subsystem that preclude issuing the clear signal to the devicedo not prevent the subchannel from becoming status pending.

When the subchannel becomes status pending as a result of performing theclear function, data transfer, if any, with the associated device hasbeen terminated. The SCSW stored when the resulting status is cleared byTEST SUBCHANNEL has the clear-function bit stored as one. If the channelsubsystem can determine that the clear signal was issued to the device,the clear-pending bit is stored as zero in the SCSW. Otherwise, theclear-pending bit is stored as one, and other indications are providedthat describe in greater detail the condition that was encountered.

Measurement data is not accumulated, and device-connect time is notstored in the extended-status word for the subchannel, for a startfunction that is terminated by CLEAR SUBCHANNEL.

Special Conditions

Condition code 3 is set, and no other action is taken, when thesubchannel is not operational for CLEAR SUBCHANNEL. A subchannel is notoperational for CLEAR SUBCHANNEL when the subchannel is not provided inthe channel subsystem, has no valid device number assigned to it, or isnot enabled.

CLEAR SUBCHANNEL can encounter the program exceptions described orlisted below.

When the multiple-subchannel-set facility is not installed, bits 32-47of general register 1 must contain 0001 hex; otherwise, an operandexception is recognized.

When the multiple-subchannel-set facility is installed, bits 32-44 ofgeneral register 1 must contain zeros, bits 45-46 must contain a validvalue, and bit 47 must contain the value one; otherwise, an operandexception is recognized.

Resulting Condition Code:

0 Function initiated

1-

2-

3 Not operational

Program Exceptions:

-   -   Operand    -   Privileged operation

Clear Function

Subsequent to the execution of CLEAR SUBCHANNEL, the channel subsystemperforms the clear function. Performance of the clear function consistsin (1) performing a path-management operation, (2) modifying fields atthe subchannel, (3) issuing the clear signal to the associated device,and (4) causing the subchannel to be made status pending, indicating thecompletion of the clear function.

Clear-Function Path Management

A path-management operation is performed as part of the clear functionin order to examine channel-path conditions for the associatedsubchannel and to attempt to choose an available channel path on whichthe clear signal can be issued to the associated device.

Channel-path conditions are examined in the following order:

1. If the channel subsystem is actively communicating or attempting toestablish active communication with the device to be signaled, thechannel path that is in use is chosen.

2. If the channel subsystem is in the process of accepting ano-longer-busy indication (which will not cause an interruptioncondition to be recognized) from the device to be signaled, and theassociated subchannel has no allegiance to any channel path, the channelpath that is in use is chosen.

3. If the associated subchannel has a dedicated allegiance for a channelpath, that channel path is chosen.

4. If the associated subchannel has a working allegiance for one or morechannel paths, one of those channel paths is chosen.

5. If the associated subchannel has no allegiance for any channel path,if a last-used channel path is indicated, and if that channel path isavailable for selection, that channel path is chosen. If that channelpath is not available for selection, either no channel path is chosen ora channel path is chosen from the set of channel paths, if any, that areavailable for selection (as though no last-used channel path wereindicated).

6. If the associated subchannel has no allegiance for any channel path,if no last-used channel path is indicated, and if there exist one ormore channel paths that are available for selection, one of thosechannel paths is chosen.

If none of the channel-path conditions listed above apply, no channelpath is chosen.

For item 4, for item 5 under the specified conditions, and for item 6,the channel subsystem chooses a channel path from a set of channelpaths. In these cases, the channel subsystem may attempt to choose achannel path, provided that the following conditions do not apply:

1. A channel-path-terminal condition exists for the channel path.

2. For a parallel or ESCON channel path: Another subchannel has anactive allegiance for the channel path.

For a FICON channel path: The channel path is currently being used toactively communicate with the maximum number of subchannels that canhave concurrent active communications.

3. The device to be signaled is attached to a type-1 control unit, andthe subchannel for another device attached to the same control unit hasan allegiance to the same channel path, unless the allegiance is aworking allegiance and primary status has been accepted by thatsubchannel.

4. The device to be signaled is attached to a type-3 control unit, andthe subchannel for another device attached to the same control unit hasa dedicated allegiance to the same channel path.

Clear-Function Subchannel Modification

Path-management-control indications at the subchannel are modifiedduring performance of the clear function. Effectively, this modificationoccurs after the attempt to choose a channel path, but prior to theattempt to select the device to issue the clear signal. Thepath-management-control indications that are modified are as follows:

1. The state of all eight possible channel paths at the subchannel isset to operational for the subchannel.

2. The last-path-used indication is reset to indicate no last-usedchannel path.

3. Path-not-operational conditions, if any, are reset.

Clear-Function Signaling and Completion

Subsequent to the attempt to choose a channel path and the modificationof the path-management-control fields, the channel subsystem, ifconditions allow, attempts to select the device to issue the clearsignal. Conditions associated with the subchannel and the chosen channelpath, if any, affect (1) whether an attempt is made to issue the clearsignal, and (2) whether the attempt to issue the clear signal issuccessful. Independent of these conditions, the subchannel issubsequently set status pending, and the performance of the clearfunction is complete. These conditions and their effect on the clearfunction are described as follows:

No Attempt is Made to Issue the Clear Signal:

The channel subsystem does not attempt to issue the clear signal to thedevice if any of the following conditions exist:

1. No channel path was chosen.

2. The chosen channel path is no longer available for selection.

3. A channel-path-terminal condition exists for the chosen channel path.

4. For parallel and ESCON channel paths: The chosen channel path iscurrently being used to actively communicate with a different device.For FICON channel paths: The chosen channel path is currently being usedto actively communicate with the maximum number of devices that can haveconcurrent active communications.

5. The device to be signaled is attached to a type-1 control unit, andthe subchannel for another device attached to the same control unit hasan allegiance to the same channel path, unless the allegiance is aworking allegiance and primary status has been accepted by thatsubchannel.

6. The device to be signaled is attached to a type-3 control unit, andthe subchannel for another device attached to the same control unit hasa dedicated allegiance to the same channel path.

If any of the conditions above exist, the subchannel remains clearpending and is set status pending, and the performance of the clearfunction is complete.

The Attempt to Issue the Clear Signal is not Successful:

When the channel subsystem attempts to issue the clear signal to thedevice, the attempt may not be successful because of the followingconditions:

1. The control unit or device signals a busy condition when the channelsubsystem attempts to select the device to issue the clear signal.

2. A path-not-operational condition is recognized when the channelsubsystem attempts to select the device to issue the clear signal.

3. An error condition is encountered when the channel subsystem attemptsto issue the clear signal.

If any of the conditions above exists and the channel subsystem eitherdetermines that the attempt to issue the clear signal was not successfulor cannot determine whether the attempt was successful, the subchannelremains clear pending and is set status pending, and the performance ofthe clear function is complete.

The Attempt to Issue the Clear Signal is Successful:

When the channel subsystem determines that the attempt to issue theclear signal was successful, the subchannel is no longer clear pendingand is set status pending, and the performance of the clear function iscomplete. When the subchannel becomes status pending, the I/O operation,if any, with the associated device has been terminated.

Programming Note:

Subsequent to the performance of the clear function, any nonzero status,except control unit end alone, that is presented to the channelsubsystem by the device is passed to the program as unsolicited alertstatus. Unsolicited status consisting of control unit end alone or zerostatus is not presented to the program.

Modify Subchannel

The information contained in the subchannel-information block (SCHIB) isplaced in the program-modifiable fields at the subchannel. As a result,the program influences, for that subchannel, certain aspects of I/Oprocessing relative to the clear, halt, resume, and start functions andcertain I/O support functions.

General register 1 contains a subsystem-identification word (SID) thatdesignates the subchannel that is to be modified as specified by certainfields of the SCHIB. The second-operand address is the logical addressof the SCHIB and must be designated on a word boundary; otherwise, aspecification exception is recognized.

The channel-subsystem operations that may be influenced due to placementof SCHIB information in the subchannel are:

-   -   I/O processing (E field)    -   Interruption processing (interruption parameter and ISC field)    -   Path management (D, LPM, and POM fields)    -   Monitoring and address-limit checking (measurement-block index,        LM, and MM fields)    -   Measurement-block-format control (F field)    -   Extended-measurement-word-mode enable (X field)    -   Concurrent-sense facility (S field)    -   Measurement-block address (MBA)

Bits 0, 1, 6, and 7 of word 1, and bits 0-28 of word 6 of the SCHIBoperand must be zeros, and bits 9 and 10 of word 1 must not both beones. When the extended-I/O-measurement-block facility is installed anda format-1 measurement block is specified, bits 26-31 of word 11 must bespecified as zeros. When the extended-I/O-measurement-block facility isnot installed, bit 29 of word 6 must be specified as zero; otherwise, anoperand exception is recognized. When the extended-I/O-measurement-wordfacility is not installed, or is installed but not enabled, bit 30 ofword 6 must be specified as zero; otherwise, an operand exception isrecognized. The remaining fields of the SCHIB are ignored and do notaffect the processing of MODIFY SUBCHANNEL.

Condition code 0 is set to indicate that the information from the SCHIBhas been placed in the program-modifiable fields at the subchannel,except that, when the device-number-valid bit (V) at the designatedsubchannel is zero, then condition code 0 is set, and the informationfrom the SCHIB is not placed in the program-modifiable fields.

Special Conditions

Condition code 1 is set, and no other action is taken, when thesubchannel is status pending.

Condition code 2 is set, and no other action is taken, when a clear,halt, or start function is in progress at the subchannel.

Condition code 3 is set, and no other action is taken, when thesubchannel is not operational for MODIFY SUBCHANNEL. A subchannel is notoperational for MODIFY SUBCHANNEL when the subchannel is not provided inthe channel subsystem.

MODIFY SUBCHANNEL can encounter the program exceptions described orlisted below.

In word 1 of the SCHIB, bits 0, 1, 6, and 7 must be zeros and, when theaddress-limit-checking facility is installed, bits 9 and 10 must notboth be ones. In word 6 of the SCHIB, bits 0-28 must be zeros. Otherwisean operand exception is recognized.

When the extended-I/O-measurement-block facility is installed and aformat-1 measurement block is specified, bits 26-31 of word 11 must bespecified as zeros; otherwise, an operand exception is recognized. Whenthe extended-I/O-measurement-block facility is not installed, bit 29 ofword 6 must be specified as zero; otherwise, an operand exception isrecognized. When the extended-I/O-measurement-word facility is notinstalled, or is installed but not enabled, bit 30 of word 6 must bespecified as zero; otherwise, an operand exception is recognized.

When the multiple-subchannel-set facility is not installed, bits 32-47of general register 1 must contain 0001 hex; otherwise, an operandexception is recognized.

When the multiple-subchannel-set facility is installed, bits 32-44 ofgeneral register 1 must contain zeros, bits 45-46 must contain a validvalue, and bit 47 must contain the value one; otherwise, an operandexception is recognized.

The second operand must be designated on a word boundary; otherwise, aspecification exception is recognized. The execution of MODIFYSUBCHANNEL is suppressed on all addressing and protection exceptions.

Resulting Condition Code:

0 Function completed

1 Status pending

2 Busy

3 Not operational

Program Exceptions:

-   -   Access (fetch, operand 2)    -   Operand    -   Privileged operation    -   Specification

Programming Notes:

1. If a device signals I/O-error alert while the associated subchannelis disabled, the channel subsystem issues the clear signal to the deviceand discards the I/O-error-alert indication without generating anI/O-interruption condition.

2. If a device presents unsolicited status while the associatedsubchannel is disabled, that status is discarded by the channelsubsystem without generating an I/O-interruption condition. However, ifthe status presented contains unit check, the channel subsystem issuesthe clear signal for the associated subchannel and does not generate anI/O-interruption condition. This should be taken into account when theprogram uses MODIFY SUBCHANNEL to enable a subchannel. For example, themedium on the associated device that was present when the subchannelbecame disabled may have been replaced, and, therefore, the programshould verify the integrity of that medium.

3. It is recommended that the program inspect the contents of thesubchannel by subsequently issuing STORE SUBCHANNEL when MODIFYSUBCHANNEL sets condition code 0. Use of STORE SUBCHANNEL is a methodfor determining if the designated subchannel was changed or not. Failureto inspect the subchannel following the setting of condition code 0 byMODIFY SUBCHANNEL may result in conditions that the program does notexpect to occur.

Start Subchannel

The channel subsystem is signaled to asynchronously perform the startfunction for the associated device, and the execution parameters thatare contained in the designated ORB are placed at the designatedsubchannel.

General register 1 contains a subsystem-identification word thatdesignates the subchannel to be started. The second-operand address isthe logical address of the ORB and must be designated on a wordboundary; otherwise, a specification exception is recognized.

The execution parameters contained in the ORB are placed at thesubchannel.

When START SUBCHANNEL is executed, the subchannel is status pending withonly secondary status, and the extended-status-word-format bit (L) iszero, the status-pending condition is discarded at the subchannel.

The subchannel is made start pending, and the start function isindicated at the subchannel. If the second operand designates acommand-mode ORB, the subchannel remains in command mode. If the secondoperand designates a transport-mode ORB, the subchannel enters transportmode. When the subchannel enters transport mode, the LPUM is set to zeroif no previous dedicated allegiance exists; otherwise the LPUM is notchanged.

Logically prior to the setting of condition code 0, path-not-operationalconditions at the subchannel, if any, are cleared.

The channel subsystem is signaled to asynchronously perform the startfunction. The start function is summarized below in the section“Associated Functions” and is described in detail thereafter.

Condition code 0 is set to indicate that the actions described abovehave been taken.

Associated Functions

Subsequent to the execution of START SUBCHANNEL, the channel subsystemasynchronously performs the start function.

The contents of the ORB, other than the fields that must contain allzeros, are checked for validity. On some models, the fields of the ORBthat must contain zeros are checked asynchronously, instead of duringthe execution of the instruction. When invalid fields are detectedasynchronously, the subchannel becomes status pending with primary,secondary, and alert status and with deferred condition code 1 andprogram check indicated. In this situation, the I/O operation or chainof I/O operations is not initiated at the device, and the condition isindicated by the start-pending bit being stored as one when the SCSW iscleared by the execution of TEST SUBCHANNEL.

On some models, path availability is tested asynchronously, instead ofduring the execution of the instruction. When no channel path isavailable for selection, the subchannel becomes status pending withprimary and secondary status and with deferred condition code 3indicated. The I/O operation or chain of I/O operations is not initiatedat the device, and this condition is indicated by the start-pending bitbeing stored as one when the SCSW is cleared by the execution of TESTSUBCHANNEL.

If conditions allow, a channel path is chosen, and execution of thechannel program that is designated in the ORB is initiated.

Special Conditions

Condition code 1 is set, and no other action is taken, when thesubchannel is status pending when START SUBCHANNEL is executed. On somemodels, condition code 1 is not set when the subchannel is statuspending with only secondary status; instead, the status-pendingcondition is discarded.

Condition code 2 is set, and no other action is taken, when a start,halt, or clear function is currently in progress at the subchannel.

Condition code 3 is set, and no other action is taken, when thesubchannel is not operational for START SUBCHANNEL. A subchannel is notoperational for START SUBCHANNEL if the subchannel is not provided inthe channel subsystem, has no valid device number associated with it, oris not enabled.

A subchannel is also not operational for START SUBCHANNEL, on somemodels, when no channel path is available for selection. On thesemodels, the lack of an available channel path is detected as part of theSTART SUBCHANNEL execution. On other models, channel-path availabilityis only tested as part of the asynchronous start function.

START SUBCHANNEL can encounter the program exceptions described orlisted below.

In word 1 of the command-mode ORB, bits 26-30 must be zeros, and, inword 2 of the command-mode ORB, bit 0 must be zero. Otherwise, on somemodels, an operand exception is recognized. On other models, anI/O-interruption condition is generated, indicating program check, aspart of the asynchronous start function.

START SUBCHANNEL can also encounter the program exceptions listed below.

When the multiple-subchannel-set facility is not installed, bits 32-47of general register 1 must contain 0001 hex; otherwise, an operandexception is recognized.

When the multiple-subchannel-set facility is installed, bits 32-44 ofgeneral register 1 must contain zeros, bits 45-46 must contain a validvalue, and bit 47 must contain the value one; otherwise, an operandexception is recognized.

The second operand must be designated on a word boundary; otherwise, aspecification exception is recognized. The execution of START SUBCHANNELis suppressed on all addressing and protection exceptions.

Resulting Condition Code:

0 Function initiated

1 Status pending

2 Busy

3 Not operational

Program Exceptions:

-   -   Access (fetch, operand 2)    -   Operand    -   Privileged operation    -   Specification

Start Function and Resume Function

The start and resume functions initiate I/O operations as describedbelow. The start function applies to subchannels operating in eithercommand mode or transport mode. The resume function applies only tosubchannels operating in command mode.

Subsequent to the execution of START SUBCHANNEL and RESUME SUBCHANNEL,the channel subsystem performs the start and resume functions,respectively, to initiate an I/O operation with the associated device.Performance of a start or resume function consists of: (1) performing apath-management operation, (2) performing an I/O operation or chain ofI/O operations with the associated device, and (3) causing thesubchannel to be made status pending, indicating the completion of thestart function. The start function initiates the execution of a channelprogram that is designated in the ORB, which in turn is designated asthe operand of START SUBCHANNEL, in contrast to the resume function thatinitiates the execution of a suspended channel program, if any,beginning at the CCW that caused suspension; otherwise, the resumefunction is performed as if it were a start function.

Start-Function and Resume-Function Path Management

A path-management operation is performed by the channel subsystem duringthe performance of either a start or a resume function to choose anavailable channel path that can be used for device selection to initiatean I/O operation with that device. The actions taken are as follows:

1. If the subchannel is currently start pending and device active, thestart function remains pending at the subchannel until the secondarystatus for the previous start function has been accepted from theassociated device and the subchannel is made start pending alone. Whenthe status is accepted and does not describe an alert interruptioncondition, the subchannel is not made status pending, and theperformance of the pending start function is subsequently initiated. Ifthe status describes an alert interruption condition, the subchannelbecomes status pending with secondary and alert status, the pendingstart function is not initiated, deferred condition code 1 is set, andthe start-pending bit remains one. If the subchannel is currently startpending alone, the performance of the start function is initiated asdescribed below.

2. If a dedicated allegiance exists at the subchannel for a channelpath, the channel subsystem chooses that path for device selection. If abusy condition is encountered while attempting to select the device anda dedicated allegiance exists at the subchannel, the start functionremains pending until the internal indication of busy is reset for thatchannel path. When the internal indication of busy is reset, theperformance of the pending start function is initiated on that channelpath.

3. If no channel path is available for selection and no dedicatedallegiance exists in the subchannel for a channel path, a channel pathis not chosen.

4. If all channel paths that are available for selection have been triedand one or more of them are being used to actively communicate withother devices, or, alternatively, if the channel subsystem hasencountered either a control-unit-busy or a device-busy condition on oneor more of those channel paths, or a combination of those conditions onone or more of those channel paths, the start function remains pendingat the subchannel until a channel path, control unit, or device, asappropriate, becomes available.

5. If (1) the start function is to be initiated on a channel path with adevice attached to a type-1 control unit and (2) no other device isattached to the same control unit whose subchannel has either adedicated allegiance to the same channel path or a working allegiance tothe same channel path where primary status has not been received forthat subchannel, then that channel path is chosen if it is available forselection; otherwise, that channel path is not chosen. If, however,another channel path to the device is available for selection and noallegiances exist as described above, that channel path is chosen. If noother channel path is available for selection, the start or resumefunction, as appropriate, remains pending until a channel path becomesavailable.

6. If the device is attached to a type-3 control unit, and if at leastone other device is attached to the same control unit whose subchannelhas a dedicated allegiance to the same channel path, another channelpath that is available for selection may be chosen, or the startfunction remains pending until the dedicated allegiance for the otherdevice is cleared.

7. If a channel path has been chosen and a busy indication is receivedduring device selection to initiate the execution of the first commandof a pending CCW channel program or to transport the TCCB of a pendingTCW channel program, the channel path over which the busy indication isreceived is not used again for that device or control unit (depending onthe device-busy or control-unit-busy indication received) until theinternal indication of busy is reset.

8. If, during an attempt to select the device in order to initiate theexecution of the first command specified for the start or implied forthe resume function for a CCW channel program, or to initiate thetransportation of the TCCB for the start function for a TCW channelprogram, (as described in action 7 above), the channel subsystemreceives a busy indication, it performs one of the following actions:

a. If the device is specified to be operating in the multipath mode andthe busy indication received is device busy, then the start or resumefunction remains pending until the internal indication of busy is reset.

b. If the device is specified to be operating in the multipath mode andthe busy indication received is control unit busy, or if the device isspecified to be operating in the single-path mode, the channel subsystemattempts selection of the device by choosing an alternate channel paththat is available for selection and continues the path-managementoperation until either the start or the resume function is initiated orselection of the device has been attempted on all channel paths that areavailable for selection. If the start or resume function has not beeninitiated by the channel subsystem after all channel paths available forselection have been chosen, the start or resume function remains pendinguntil the internal indication of busy is reset.

c. If the subchannel has a dedicated allegiance, then action 2 on page15-20 applies.

9. When, during the selection attempt to transfer the first command fora CCW channel program, or to transport the TCCB for a TCW channelprogram, the device appears not operational and the correspondingchannel path is operational for the subchannel, a path-not-operationalcondition is recognized, and the state of the channel path changes atthe subchannel from operational for the subchannel to not operationalfor the subchannel. The path-not-operational conditions at thesubchannel, if any, are preserved until the subchannel next becomesclear pending, start pending, or resume pending (if the subchannel wassuspended), at which time the path-not-operational conditions arecleared. If, however, the corresponding channel path is not operationalfor the subchannel, a path-not-operational condition is not recognized.When the device appears not operational during the selection attempt totransfer the first command or TCCB on a channel path that is availablefor selection, one of the following actions occurs:

a. If a dedicated allegiance exists for that channel path, then it isthe only channel path that is available for selection; therefore,further attempts to initiate the start or resume function are abandoned,and an interruption condition is recognized.

b. If no dedicated allegiance exists and there are alternate channelpaths available for selection that have not been tried, one of thosechannel paths is chosen to attempt device selection and transfer thefirst command for a CCW channel program, or the TCCB for a TCW channelprogram.

c. If no dedicated allegiance exists, no alternate channel paths areavailable for selection that have not been tried, and the device hasappeared operational on at least one of the channel paths that weretried, the start or resume function remains pending at the subchanneluntil a channel path, a control unit, or the device, as appropriate,becomes available.

d. If no dedicated allegiance exists, no alternate channel paths areavailable for selection that have not been tried, and the device hasappeared not operational on all channel paths that were tried, furtherattempts to initiate the start or resume function are abandoned, and aninterruption condition is recognized.

10. When the subchannel is active and an I/O operation is to beinitiated with a device, all device selections occur according to theLPUM indication if the multipath mode is not specified at thesubchannel. For example, if command chaining is specified for a CCWchannel program, the channel subsystem transfers the first and allsubsequent commands describing a chain of I/O operations over the samechannel path.

Execution of I/O Operations

After a channel path is chosen, the channel subsystem, if conditionsallow, initiates the execution of an I/O operation with the associateddevice. Execution of additional I/O operations may follow the initiationand execution of the first I/O operation.

For subchannels operating in command mode, the channel subsystem canexecute seven types of commands: write, read, read backward, control,sense, sense ID, and transfer in channel. Each command, except transferin channel, initiates a corresponding I/O operation. Except for periodswhen channel-program execution is suspended at the subchannel, thesubchannel is active from the acceptance of the first command until theprimary interruption condition is recognized at the subchannel. If theprimary interruption condition is recognized before the acceptance ofthe first command, the subchannel does not become active. Normally, theprimary interruption condition is caused by the channel-end signal or,in the case of command chaining, the channel-end signal for the last CCWof the chain. The device is active until the secondary interruptioncondition is recognized at the subchannel. Normally, the secondaryinterruption condition is caused by the device-end signal or, in thecase of command chaining, the device-end signal for the last CCW of thechain.

For subchannels operating in transport mode, the channel subsystem cantransport six types of commands for execution: write, read, control,sense, sense ID, and interrogate. Each command initiates a correspondingdevice operation. When one or more commands are transported to the I/Odevice in a TCCB, the subchannel remains start pending until primarystatus is presented.

Programming Notes:

In the single-path mode, all transfers of commands, data, and status forthe I/O operation or chain of I/O operations occur on the channel pathover which the first command was transferred to the device.

When the device has the dynamic-reconnection feature installed, an I/Ooperation or chain of I/O operations may be performed in the multipathmode. To operate in the multipath mode, MODIFY SUBCHANNEL must have beenpreviously executed for the subchannel with bit 13 of word 1 of theSCHIB specified as one. In addition, the device must be set up for themultipath mode by the execution of certain model-dependent commandsappropriate to that type of device. The general procedures for handlingmultipath-mode operations are as follows:

1. Setup

a. A set-multipath-mode type of command must be successfully executed bythe device on each channel path that is to be a member of the multipathgroup being set up; otherwise, the multipath mode of operation may giveunpredictable results at the subchannel. If, for any reason, one or morephysically available channel paths to the device are not included in themultipath group, these channel paths must not be available for selectionwhile the subchannel is operating in the multipath mode. A channel pathcan be made not available for selection by having the corresponding LPMbit set to zero either in the SCHIB prior to the execution of MODIFYSUBCHANNEL or in the ORB prior to the execution of START SUBCHANNEL.

b. When a set-multipath-mode type of command is transferred to a device,only a single channel path must be logically available in order to avoidalternate channel-path selection for the execution of that startfunction; otherwise, device-busy conditions may be detected by thechannel subsystem on more than one channel path, which may causeunpredictable results for subsequent multipath-mode operations. Thistype of setup procedure should be used whenever the membership of amultipath group is changed.

2. Leaving the Multipath Mode

To leave the multipath mode and continue processing in the single-pathmode, either of the following two procedures may be used:

a. A disband-multipath-mode type of command may be executed for anychannel path of the multipath group. This command must be followed byeither (1) the execution of MODIFY SUBCHANNEL with bit 13 of word 1 ofthe SCHIB specified as zero, or (2) the specification of only a singlechannel path as logically available in the LPM. A start function mustnot be performed at a subchannel operating in the multipath mode withmultiple channel paths available for selection while the device isoperating in single-path mode; otherwise, unpredictable results mayoccur at the subchannel for that function or subsequent start functions.

b. A resign-multipath-mode type of command is executed on each channelpath of the multipath group (the reverse of the setup). This commandmust be followed by either (1) the execution of MODIFY SUBCHANNEL withbit 13 of word 1 of the SCHIB specified as zero, or (2) thespecification of only a single channel path as logically available inthe LPM. No start function may be performed at a subchannel operating inthe multipath mode with multiple channel paths available for selectionwhile the device is operating in single-path mode; otherwise,unpredictable results may occur at the subchannel for that or subsequentstart functions.

Blocking of Data

Data recorded by an I/O device is divided into blocks. The length of ablock depends on the device; for example, a block can be a card, a lineof printing, or the information recorded between two consecutive gaps onmagnetic tape.

The maximum amount of information that can be transferred in one I/Ooperation is one block. An I/O operation is terminated when theassociated main-storage area is exhausted or the end of the block isreached, whichever occurs first. For some operations, such as writing ona magnetic-tape unit or at an inquiry station, blocks are not defined,and the amount of information transferred is controlled only by theprogram.

Operation-Request Block

The operation-request block (ORB) is the operand of START SUBCHANNEL.The ORB specifies the parameters to be used in controlling thatparticular start function. These parameters include the interruptionparameter, the subchannel key, the address of first CCW or the TCW,operation-control bits, priority-control numbers, and a specification ofthe logical availability of channel paths to the designated device.

The contents of the ORB are placed at the designated subchannel duringthe execution of START SUBCHANNEL, prior to the setting of conditioncode 0. If the execution will result in a nonzero condition code, thecontents of the ORB are not placed at the designated subchannel.

The two rightmost bits of the ORB address must be zeros, placing the ORBon a word boundary; otherwise, a specification exception is recognized.When the fibre-channel-extensions (FCX) facility is installed, thechannel-program-type control (B) (word 1, bit 13) of the ORB specifiesthe type of channel program that is designated by the ORB. When B iszero, the ORB designates a CCW channel program. When the B is one, theORB designates a TCW channel program. Only I/O-devices that support FCXrecognize TCW channel programs.

If the contents of an ORB that designates a CCW channel program areplaced at the designated subchannel during the execution of STARTSUBCHANNEL, the subchannel remains in command mode. Thus, such an ORB isalso known as a command-mode ORB. If the contents of an ORB thatdesignates a TCW channel program are placed at the designated subchannelduring execution of START SUBCHANNEL, the subchannel enters transportmode. Thus, such an ORB is also known as a transport-mode ORB.

Test Pending Interruption

The I/O-interruption code for a pending I/O interruption at a subchannelis stored at the location designated by the second-operand address, andthe pending I/O-interruption request is cleared.

The second-operand address, when nonzero, is the logical address of thelocation where the two-word I/O-interruption code, consisting of words 0and 1, is to be stored. The second-operand address must be designated ona word boundary; otherwise, a specification exception is recognized.

If the second-operand address is zero, the three-word I/O-interruptioncode, consisting of words 0-2, is stored at real locations 184-195. Inthis case, low-address protection and key-controlled protection do notapply.

In the access-register mode when the second-operand address is zero, itis unpredictable whether access-register translation occurs for accessregister B2. If the translation occurs, the resultingaddress-space-control element is not used; that is, the interruptioncode still is stored at real locations 184-195.

Pending I/O-interruption requests are accepted only for thoseI/O-interruption subclasses allowed by the I/O-interruption-subclassmask in control register 6 of the CPU executing the instruction. If noI/O-interruption requests exist that are allowed by control register 6,the I/O-interruption code is not stored, the second-operand location isnot modified, and condition code 0 is set.

If a pending I/O-interruption request is accepted, the I/O-interruptioncode is stored, the pending I/O-interruption request is cleared, andcondition code 1 is set. The I/O-interruption code that is stored is thesame as would be stored if an I/O interruption had occurred. However,PSWs are not swapped as when an I/O-interruption occurs. execution ofthe instruction is defined as follows:

Subsystem-Identification Word (SID):

Bits 32-63 of the SID are placed in word 0.

Interruption Parameter:

Word 1 contains a four-byte parameter that was specified by the programand passed to the subchannel in word 0 of the ORB or the PMCW. When adevice presents alert status and the interruption parameter was notpreviously passed to the subchannel by an execution of START SUBCHANNELor MODIFY SUBCHANNEL, this field contains zeros.

Interruption-Identification Word:

Word 2, when stored, contains the interruption-identification word,which further identifies the source of the I/O-interruption. Word 2 isstored only when the second-operand address is zero.

The interruption-identification word is defined as follows:

A bit (A):

Bit 0 of the interruption-identification word specifies the type ofpending I/O-interruption request that was cleared. When bit 0 is zero,the I/O-interruption request was associated with a subchannel.

I/O-Interruption Subclass (ISC):

Bit positions 2-4 of the interruption-identification word contain anunsigned binary integer, in the range 0-7, that specifies theI/O-interruption subclass associated with the subchannel for which thepending I/O-interruption request was cleared. The remaining bitpositions are reserved and stored as zeros.

Special Conditions

TEST PENDING INTERRUPTION can encounter the program exceptions describedor listed below.

The second operand must be designated on a word boundary; otherwise, aspecification exception is recognized.

The execution of TEST PENDING INTERRUPTION is suppressed on alladdressing and protection exceptions.

Resulting Condition Code:

0 Interruption code not stored

1 Interruption code stored

2-

3-

Program Exceptions:

-   -   Access (store, operand 2, second-operand address nonzero only)    -   Privileged operation    -   Specification

Programming Notes:

1. TEST PENDING INTERRUPTION should only be executed with asecond-operand address of zero when I/O interruptions are masked off.Otherwise, an I/O-interruption code stored by the instruction may belost if an I/O interruption occurs. The I/O-interruption code thatidentifies the source of an I/O interruption taken subsequent to TESTPENDING INTERRUPTION is also stored at real locations 184-195, replacingan I/O-interruption code that was stored by the instruction.

2. In the access-register mode when the second-operand address is zero,an access exception is recognized if access-register translation occursand the access register is in error. This exception can be prevented bymaking the B2 field zero or by placing 00000000 hex, 00000001 hex, orany other valid contents in the access register.

Store Subchannel

Control and status information for the designated subchannel is storedin the designated SCHIB.

General register 1 contains a subsystem-identification word thatdesignates the subchannel for which the information is to be stored. Thesecond-operand address is the logical address of the SCHIB and must bedesignated on a word boundary; otherwise, a specification exception isrecognized.

When the extended-I/O-measurement-block facility is not installed, theinformation that is stored in the SCHIB consists of apath-management-control word, a SCSW, and three words of model-dependentinformation. When the extended-I/O-measurement-block facility isinstalled, the information that is stored in the SCHIB consists of apath-management-control word, a SCSW, the measurement-block-addressfield, and one word of model-dependent information.

The execution of STORE SUBCHANNEL does not change any information at thesubchannel.

Condition code 0 is set to indicate that control and status informationfor the designated subchannel has been stored in the SCHIB. When theexecution of STORE SUBCHANNEL results in the setting of condition code0, the information in the SCHIB indicates a consistent state of thesubchannel.

Special Conditions

Condition code 3 is set, and no other action is taken, when thedesignated subchannel is not operational for STORE SUBCHANNEL. Asubchannel is not operational for STORE SUBCHANNEL if the subchannel isnot provided in the channel subsystem.

STORE SUBCHANNEL can encounter the program exceptions described orlisted below.

When the multiple-subchannel-set facility is not installed, bits 32-47of general register 1 must contain 0001 hex; otherwise, an operandexception is recognized.

When the multiple-subchannel-set facility is installed, bits 32-44 ofgeneral register 1 must contain zeros, bits 45-46 must contain a validvalue, and bit 47 must contain the value one; otherwise, an operandexception is recognized.

The second operand must be designated on a word boundary; otherwise, aspecification exception is recognized.

Resulting Condition Code:

0 SCHIB stored

1-

2-

3 Not operational

Program Exceptions:

-   -   Access (store, operand 2)    -   Operand    -   Privileged operation    -   Specification

Programming Notes:

1. Device status that is stored in the SCSW may include device-busy,control-unit-busy, or control-unit-end indications.

2. The information that is stored in the SCHIB is obtained from thesubchannel. The STORE SUBCHANNEL instruction does not cause the channelsubsystem to interrogate the addressed device.

3. STORE SUBCHANNEL may be executed at any time to sample conditionsexisting at the subchannel, without causing any pending statusconditions to be cleared.

4. Repeated execution of STORE SUBCHANNEL without an intervening delay(for example, to determine when a subchannel changes state) should beavoided because repeated accesses of the subchannel by the CPU may delayor prohibit access of the subchannel by a channel subsystem to updatethe subchannel.

Test Subchannel

Control and status information for the subchannel is stored in thedesignated IRB.

General register 1 contains a subsystem-identification word thatdesignates the subchannel for which the information is to be stored. Thesecond-operand address is the logical address of the IRB and must bedesignated on a word boundary; otherwise, a specification exception isrecognized.

The information that is stored in the IRB consists of a SCSW, anextended-status word, and an extended-control word.

If the subchannel is status pending, the status-pending bit of thestatus-control field is stored as one. Whether or not the subchannel isstatus pending has an effect on the functions that are performed whenTEST SUBCHANNEL is executed.

When the subchannel is status pending and TEST SUBCHANNEL is executed,information, as described above, is stored in the IRB, followed by theclearing of certain conditions and indications that exist at thesubchannel. If the subchannel is in transport mode, the clearing ofthese conditions, specifically the start function, places the subchannelin command mode. If an I/O-interruption request is pending for thesubchannel, the request is cleared. Condition code 0 is set to indicatethat these actions have been taken.

When the subchannel is not status pending and TEST SUBCHANNEL isexecuted, information is stored in the IRB, and no conditions orindications are cleared. Condition code 1 is set to indicate that theseactions have been taken.

Special Conditions

Condition code 3 is set, and no other action is taken, when thesubchannel is not operational for TEST SUBCHANNEL. A subchannel is notoperational for TEST SUBCHANNEL if the subchannel is not provided, hasno valid device number associated with it, or is not enabled.

TEST SUBCHANNEL can encounter the program exceptions described or listedbelow.

When the multiple-subchannel-set facility is not installed, bits 32-47of general register 1 must contain 0001 hex; otherwise, an operandexception is recognized.

When the multiple-subchannel-set facility is installed, bits 32-44 ofgeneral register 1 must contain zeros, bits 45-46 must contain a validvalue, and bit 47 must contain the value one; otherwise, an operandexception is recognized.

The second operand must be designated on a word boundary; otherwise, aspecification exception is recognized.

When the execution of TEST SUBCHANNEL is terminated on addressing andprotection exceptions, the state of the subchannel is not changed.

Resulting Condition Code:

0 IRB stored; subchannel status pending

1 IRB stored; subchannel not status pending

2-

3 Not operational

Program Exceptions:

-   -   Access (store, operand 2)    -   Operand    -   Privileged operation    -   Specification

Programming Notes:

1. Device status that is stored in the SCSW may include device-busy,control-unit-busy, or control-unit-end indications.

2. The information that is stored in the IRB is obtained from thesubchannel. The TEST SUBCHANNEL instruction does not cause the channelsubsystem to interrogate the addressed device.

3. When an I/O interruption occurs, it is the result of a status-pendingcondition at the subchannel, and typically TEST SUBCHANNEL is executedto clear the status. TEST SUBCHANNEL may also be executed at any othertime to sample conditions existing at the subchannel.

4. Repeated execution of TEST SUBCHANNEL to determine when a startfunction has been completed should be avoided because there areconditions under which the completion of the start function may or maynot be indicated. For example, if the channel subsystem is holding aninterface-control-check (IFCC) condition in abeyance (for anysubchannel) because another subchannel is already status pending, and ifthe start function being tested by TEST SUBCHANNEL has as the only pathavailable for selection the channel path with the IFCC condition, thenthe start function may not be initiated until the status-pendingcondition in the other subchannel is cleared, allowing the IFCCcondition to be indicated at the subchannel to which it applies.

5. Repeated execution of TEST SUBCHANNEL without an intervening delay,for example, to determine when a subchannel changes state, should beavoided because repeated accesses of the subchannel by the CPU may delayor prohibit accessing of the subchannel by the channel subsystem.Execution of TEST SUBCHANNEL by multiple CPUs for the same subchannel atapproximately the same time may have the same effect and also should beavoided.

6. The priority of I/O-interruption handling by a CPU can be modified bythe execution of TEST SUBCHANNEL. When TEST SUBCHANNEL is executed andthe designated subchannel has an I/O-interruption request pending, thatI/O-interruption request is cleared, and the SCSW is stored, withoutregard to any previously established priority. The relative priority ofthe remaining I/O-interruption requests is unchanged

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system”.Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readablestorage medium. A computer readable storage medium may be, for example,but not limited to, an electronic, magnetic, optical, electromagnetic,infrared or semiconductor system, apparatus, or device, or any suitablecombination of the foregoing. More specific examples (a non-exhaustivelist) of the computer readable storage medium include the following: anelectrical connection having one or more wires, a portable computerdiskette, a hard disk, a random access memory (RAM), a read-only memory(ROM), an erasable programmable read-only memory (EPROM or Flashmemory), an optical fiber, a portable compact disc read-only memory(CD-ROM), an optical storage device, a magnetic storage device, or anysuitable combination of the foregoing. In the context of this document,a computer readable storage medium may be any tangible medium that cancontain or store a program for use by or in connection with aninstruction execution system, apparatus, or device.

Referring now to FIG. 10, in one example, a computer program product1000 includes, for instance, one or more non-transitory computerreadable storage media 1002 to store computer readable program codemeans or logic 1004 thereon to provide and facilitate one or moreaspects of the present invention.

Program code embodied on a computer readable medium may be transmittedusing an appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programminglanguage, such as Java, Smalltalk, C++ or the like, and conventionalprocedural programming languages, such as the “C” programming language,assembler or similar programming languages. The program code may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider).

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

In addition to the above, one or more aspects of the present inventionmay be provided, offered, deployed, managed, serviced, etc. by a serviceprovider who offers management of customer environments. For instance,the service provider can create, maintain, support, etc. computer codeand/or a computer infrastructure that performs one or more aspects ofthe present invention for one or more customers. In return, the serviceprovider may receive payment from the customer under a subscriptionand/or fee agreement, as examples. Additionally or alternatively, theservice provider may receive payment from the sale of advertisingcontent to one or more third parties.

In one aspect of the present invention, an application may be deployedfor performing one or more aspects of the present invention. As oneexample, the deploying of an application comprises providing computerinfrastructure operable to perform one or more aspects of the presentinvention.

As a further aspect of the present invention, a computing infrastructuremay be deployed comprising integrating computer readable code into acomputing system, in which the code in combination with the computingsystem is capable of performing one or more aspects of the presentinvention.

As yet a further aspect of the present invention, a process forintegrating computing infrastructure comprising integrating computerreadable code into a computer system may be provided. The computersystem comprises a computer readable medium, in which the computermedium comprises one or more aspects of the present invention. The codein combination with the computer system is capable of performing one ormore aspects of the present invention.

Although various embodiments are described above, these are onlyexamples. For example, computing environments of other architectures canincorporate and use one or more aspects of the present invention. Asexamples, servers other than z196 servers can include, use and/orbenefit from one or more aspects of the present invention. Further,other instructions and/or commands may be used; and theinstructions/commands may include additional, fewer and/or differentinformation than described herein. Many variations are possible.

Further, other types of computing environments can benefit from one ormore aspects of the present invention. As an example, a data processingsystem suitable for storing and/or executing program code is usable thatincludes at least two processors coupled directly or indirectly tomemory elements through a system bus. The memory elements include, forinstance, local memory employed during actual execution of the programcode, bulk storage, and cache memory which provide temporary storage ofat least some program code in order to reduce the number of times codemust be retrieved from bulk storage during execution.

Input/Output or I/O devices (including, but not limited to, keyboards,displays, pointing devices, DASD, tape, CDs, DVDs, thumb drives andother memory media, etc.) can be coupled to the system either directlyor through intervening I/O controllers. Network adapters may also becoupled to the system to enable the data processing system to becomecoupled to other data processing systems or remote printers or storagedevices through intervening private or public networks. Modems, cablemodems, and Ethernet cards are just a few of the available types ofnetwork adapters.

Referring to FIG. 11, representative components of a Host Computersystem 5000 to implement one or more aspects of the present inventionare portrayed. The representative host computer 5000 comprises one ormore CPUs 5001 in communication with computer memory (i.e., centralstorage) 5002, as well as I/O interfaces to storage media devices 5011and networks 5010 for communicating with other computers or SANs and thelike. The CPU 5001 is compliant with an architecture having anarchitected instruction set and architected functionality. The CPU 5001may have dynamic address translation (DAT) 5003 for transforming programaddresses (virtual addresses) into real addresses of memory. A DATtypically includes a translation lookaside buffer (TLB) 5007 for cachingtranslations so that later accesses to the block of computer memory 5002do not require the delay of address translation. Typically, a cache 5009is employed between computer memory 5002 and the processor 5001. Thecache 5009 may be hierarchical having a large cache available to morethan one CPU and smaller, faster (lower level) caches between the largecache and each CPU. In some implementations, the lower level caches aresplit to provide separate low level caches for instruction fetching anddata accesses. In one embodiment, an instruction is fetched from memory5002 by an instruction fetch unit 5004 via a cache 5009. The instructionis decoded in an instruction decode unit 5006 and dispatched (with otherinstructions in some embodiments) to instruction execution unit or units5008. Typically several execution units 5008 are employed, for examplean arithmetic execution unit, a floating point execution unit and abranch instruction execution unit. The instruction is executed by theexecution unit, accessing operands from instruction specified registersor memory as needed. If an operand is to be accessed (loaded or stored)from memory 5002, a load/store unit 5005 typically handles the accessunder control of the instruction being executed. Instructions may beexecuted in hardware circuits or in internal microcode (firmware) or bya combination of both.

As noted, a computer system includes information in local (or main)storage, as well as addressing, protection, and reference and changerecording. Some aspects of addressing include the format of addresses,the concept of address spaces, the various types of addresses, and themanner in which one type of address is translated to another type ofaddress. Some of main storage includes permanently assigned storagelocations. Main storage provides the system with directly addressablefast-access storage of data. Both data and programs are to be loadedinto main storage (from input devices) before they can be processed.

Main storage may include one or more smaller, faster-access bufferstorages, sometimes called caches. A cache is typically physicallyassociated with a CPU or an I/O processor. The effects, except onperformance, of the physical construction and use of distinct storagemedia are generally not observable by the program.

Separate caches may be maintained for instructions and for dataoperands. Information within a cache is maintained in contiguous byteson an integral boundary called a cache block or cache line (or line, forshort). A model may provide an EXTRACT CACHE ATTRIBUTE instruction whichreturns the size of a cache line in bytes. A model may also providePREFETCH DATA and PREFETCH DATA RELATIVE LONG instructions which effectsthe prefetching of storage into the data or instruction cache or thereleasing of data from the cache.

Storage is viewed as a long horizontal string of bits. For mostoperations, accesses to storage proceed in a left-to-right sequence. Thestring of bits is subdivided into units of eight bits. An eight-bit unitis called a byte, which is the basic building block of all informationformats. Each byte location in storage is identified by a uniquenonnegative integer, which is the address of that byte location or,simply, the byte address. Adjacent byte locations have consecutiveaddresses, starting with 0 on the left and proceeding in a left-to-rightsequence. Addresses are unsigned binary integers and are 24, 31, or 64bits.

Information is transmitted between storage and a CPU or a channelsubsystem one byte, or a group of bytes, at a time. Unless otherwisespecified, in, for instance, the z/Architecture®, a group of bytes instorage is addressed by the leftmost byte of the group. The number ofbytes in the group is either implied or explicitly specified by theoperation to be performed. When used in a CPU operation, a group ofbytes is called a field. Within each group of bytes, in, for instance,the z/Architecture®, bits are numbered in a left-to-right sequence. Inthe z/Architecture®, the leftmost bits are sometimes referred to as the“high-order” bits and the rightmost bits as the “low-order” bits. Bitnumbers are not storage addresses, however. Only bytes can be addressed.To operate on individual bits of a byte in storage, the entire byte isaccessed. The bits in a byte are numbered 0 through 7, from left toright (in, e.g., the z/Architecture®). The bits in an address may benumbered 8-31 or 40-63 for 24-bit addresses, or 1-31 or 33-63 for 31-bitaddresses; they are numbered 0-63 for 64-bit addresses. Within any otherfixed-length format of multiple bytes, the bits making up the format areconsecutively numbered starting from 0. For purposes of error detection,and in preferably for correction, one or more check bits may betransmitted with each byte or with a group of bytes. Such check bits aregenerated automatically by the machine and cannot be directly controlledby the program. Storage capacities are expressed in number of bytes.When the length of a storage-operand field is implied by the operationcode of an instruction, the field is said to have a fixed length, whichcan be one, two, four, eight, or sixteen bytes. Larger fields may beimplied for some instructions. When the length of a storage-operandfield is not implied but is stated explicitly, the field is said to havea variable length. Variable-length operands can vary in length byincrements of one byte (or with some instructions, in multiples of twobytes or other multiples). When information is placed in storage, thecontents of only those byte locations are replaced that are included inthe designated field, even though the width of the physical path tostorage may be greater than the length of the field being stored.

Certain units of information are to be on an integral boundary instorage. A boundary is called integral for a unit of information whenits storage address is a multiple of the length of the unit in bytes.Special names are given to fields of 2, 4, 8, and 16 bytes on anintegral boundary. A halfword is a group of two consecutive bytes on atwo-byte boundary and is the basic building block of instructions. Aword is a group of four consecutive bytes on a four-byte boundary. Adoubleword is a group of eight consecutive bytes on an eight-byteboundary. A quadword is a group of 16 consecutive bytes on a 16-byteboundary. When storage addresses designate halfwords, words,doublewords, and quadwords, the binary representation of the addresscontains one, two, three, or four rightmost zero bits, respectively.Instructions are to be on two-byte integral boundaries. The storageoperands of most instructions do not have boundary-alignmentrequirements.

On devices that implement separate caches for instructions and dataoperands, a significant delay may be experienced if the program storesinto a cache line from which instructions are subsequently fetched,regardless of whether the store alters the instructions that aresubsequently fetched.

In one embodiment, the invention may be practiced by software (sometimesreferred to licensed internal code, firmware, micro-code, milli-code,pico-code and the like, any of which would be consistent with thepresent invention). Referring to FIG. 11, software program code whichembodies the present invention is typically accessed by processor 5001of the host system 5000 from long-term storage media devices 5011, suchas a CD-ROM drive, tape drive or hard drive. The software program codemay be embodied on any of a variety of known media for use with a dataprocessing system, such as a diskette, hard drive, or CD-ROM. The codemay be distributed on such media, or may be distributed to users fromcomputer memory 5002 or storage of one computer system over a network5010 to other computer systems for use by users of such other systems.

The software program code includes an operating system which controlsthe function and interaction of the various computer components and oneor more application programs. Program code is normally paged fromstorage media device 5011 to the relatively higher-speed computerstorage 5002 where it is available for processing by processor 5001. Thetechniques and methods for embodying software program code in memory, onphysical media, and/or distributing software code via networks are wellknown and will not be further discussed herein. Program code, whencreated and stored on a tangible medium (including but not limited toelectronic memory modules (RAM), flash memory, Compact Discs (CDs),DVDs, Magnetic Tape and the like is often referred to as a “computerprogram product”. The computer program product medium is typicallyreadable by a processing circuit preferably in a computer system forexecution by the processing circuit.

FIG. 12 illustrates a representative workstation or server hardwaresystem in which the present invention may be practiced. The system 5020of FIG. 12 comprises a representative base computer system 5021, such asa personal computer, a workstation or a server, including optionalperipheral devices. The base computer system 5021 includes one or moreprocessors 5026 and a bus employed to connect and enable communicationbetween the processor(s) 5026 and the other components of the system5021 in accordance with known techniques. The bus connects the processor5026 to memory 5025 and long-term storage 5027 which can include a harddrive (including any of magnetic media, CD, DVD and Flash Memory forexample) or a tape drive for example. The system 5021 might also includea user interface adapter, which connects the microprocessor 5026 via thebus to one or more interface devices, such as a keyboard 5024, a mouse5023, a printer/scanner 5030 and/or other interface devices, which canbe any user interface device, such as a touch sensitive screen,digitized entry pad, etc. The bus also connects a display device 5022,such as an LCD screen or monitor, to the microprocessor 5026 via adisplay adapter.

The system 5021 may communicate with other computers or networks ofcomputers by way of a network adapter capable of communicating 5028 witha network 5029. Example network adapters are communications channels,token ring, Ethernet or modems. Alternatively, the system 5021 maycommunicate using a wireless interface, such as a CDPD (cellular digitalpacket data) card. The system 5021 may be associated with such othercomputers in a Local Area Network (LAN) or a Wide Area Network (WAN), orthe system 5021 can be a client in a client/server arrangement withanother computer, etc. All of these configurations, as well as theappropriate communications hardware and software, are known in the art.

FIG. 13 illustrates a data processing network 5040 in which the presentinvention may be practiced. The data processing network 5040 may includea plurality of individual networks, such as a wireless network and awired network, each of which may include a plurality of individualworkstations 5041, 5042, 5043, 5044. Additionally, as those skilled inthe art will appreciate, one or more LANs may be included, where a LANmay comprise a plurality of intelligent workstations coupled to a hostprocessor.

Still referring to FIG. 13, the networks may also include mainframecomputers or servers, such as a gateway computer (client server 5046) orapplication server (remote server 5048 which may access a datarepository and may also be accessed directly from a workstation 5045). Agateway computer 5046 serves as a point of entry into each individualnetwork. A gateway is needed when connecting one networking protocol toanother. The gateway 5046 may be preferably coupled to another network(the Internet 5047 for example) by means of a communications link. Thegateway 5046 may also be directly coupled to one or more workstations5041, 5042, 5043, 5044 using a communications link. The gateway computermay be implemented utilizing an IBM eServer™ System z® server availablefrom International Business Machines Corporation.

Referring concurrently to FIG. 12 and FIG. 13, software programming codewhich may embody the present invention may be accessed by the processor5026 of the system 5020 from long-term storage media 5027, such as aCD-ROM drive or hard drive. The software programming code may beembodied on any of a variety of known media for use with a dataprocessing system, such as a diskette, hard drive, or CD-ROM. The codemay be distributed on such media, or may be distributed to users 5050,5051 from the memory or storage of one computer system over a network toother computer systems for use by users of such other systems.

Alternatively, the programming code may be embodied in the memory 5025,and accessed by the processor 5026 using the processor bus. Suchprogramming code includes an operating system which controls thefunction and interaction of the various computer components and one ormore application programs 5032. Program code is normally paged fromstorage media 5027 to high-speed memory 5025 where it is available forprocessing by the processor 5026. The techniques and methods forembodying software programming code in memory, on physical media, and/ordistributing software code via networks are well known and will not befurther discussed herein. Program code, when created and stored on atangible medium (including but not limited to electronic memory modules(RAM), flash memory, Compact Discs (CDs), DVDs, Magnetic Tape and thelike is often referred to as a “computer program product”. The computerprogram product medium is typically readable by a processing circuitpreferably in a computer system for execution by the processing circuit.

The cache that is most readily available to the processor (normallyfaster and smaller than other caches of the processor) is the lowest (L1or level one) cache and main store (main memory) is the highest levelcache (L3 if there are 3 levels). The lowest level cache is oftendivided into an instruction cache (I-Cache) holding machine instructionsto be executed and a data cache (D-Cache) holding data operands.

Referring to FIG. 14, an exemplary processor embodiment is depicted forprocessor 5026. Typically one or more levels of cache 5053 are employedto buffer memory blocks in order to improve processor performance. Thecache 5053 is a high speed buffer holding cache lines of memory datathat are likely to be used. Typical cache lines are 64, 128 or 256 bytesof memory data. Separate caches are often employed for cachinginstructions than for caching data. Cache coherence (synchronization ofcopies of lines in memory and the caches) is often provided by various“snoop” algorithms well known in the art. Main memory storage 5025 of aprocessor system is often referred to as a cache. In a processor systemhaving 4 levels of cache 5053, main storage 5025 is sometimes referredto as the level 5 (L5) cache since it is typically faster and only holdsa portion of the non-volatile storage (DASD, tape etc) that is availableto a computer system. Main storage 5025 “caches” pages of data paged inand out of the main storage 5025 by the operating system.

A program counter (instruction counter) 5061 keeps track of the addressof the current instruction to be executed. A program counter in az/Architecture® processor is 64 bits and can be truncated to 31 or 24bits to support prior addressing limits. A program counter is typicallyembodied in a PSW (program status word) of a computer such that itpersists during context switching. Thus, a program in progress, having aprogram counter value, may be interrupted by, for example, the operatingsystem (context switch from the program environment to the operatingsystem environment). The PSW of the program maintains the programcounter value while the program is not active, and the program counter(in the PSW) of the operating system is used while the operating systemis executing. Typically, the program counter is incremented by an amountequal to the number of bytes of the current instruction. RISC (ReducedInstruction Set Computing) instructions are typically fixed length whileCISC (Complex Instruction Set Computing) instructions are typicallyvariable length. Instructions of the IBM z/Architecture® are CISCinstructions having a length of 2, 4 or 6 bytes. The Program counter5061 is modified by either a context switch operation or a branch takenoperation of a branch instruction for example. In a context switchoperation, the current program counter value is saved in the programstatus word along with other state information about the program beingexecuted (such as condition codes), and a new program counter value isloaded pointing to an instruction of a new program module to beexecuted. A branch taken operation is performed in order to permit theprogram to make decisions or loop within the program by loading theresult of the branch instruction into the program counter 5061.

Typically an instruction fetch unit 5055 is employed to fetchinstructions on behalf of the processor 5026. The fetch unit eitherfetches “next sequential instructions”, target instructions of branchtaken instructions, or first instructions of a program following acontext switch. Modern Instruction fetch units often employ prefetchtechniques to speculatively prefetch instructions based on thelikelihood that the prefetched instructions might be used. For example,a fetch unit may fetch 16 bytes of instruction that includes the nextsequential instruction and additional bytes of further sequentialinstructions.

The fetched instructions are then executed by the processor 5026. In anembodiment, the fetched instruction(s) are passed to a dispatch unit5056 of the fetch unit. The dispatch unit decodes the instruction(s) andforwards information about the decoded instruction(s) to appropriateunits 5057, 5058, 5060. An execution unit 5057 will typically receiveinformation about decoded arithmetic instructions from the instructionfetch unit 5055 and will perform arithmetic operations on operandsaccording to the opcode of the instruction. Operands are provided to theexecution unit 5057 preferably either from memory 5025, architectedregisters 5059 or from an immediate field of the instruction beingexecuted. Results of the execution, when stored, are stored either inmemory 5025, registers 5059 or in other machine hardware (such ascontrol registers, PSW registers and the like).

A processor 5026 typically has one or more units 5057, 5058, 5060 forexecuting the function of the instruction. Referring to FIG. 15A, anexecution unit 5057 may communicate with architected general registers5059, a decode/dispatch unit 5056, a load store unit 5060, and other5065 processor units by way of interfacing logic 5071. An execution unit5057 may employ several register circuits 5067, 5068, 5069 to holdinformation that the arithmetic logic unit (ALU) 5066 will operate on.The ALU performs arithmetic operations such as add, subtract, multiplyand divide as well as logical function such as and, or and exclusive- or(XOR), rotate and shift. Preferably the ALU supports specializedoperations that are design dependent. Other circuits may provide otherarchitected facilities 5072 including condition codes and recoverysupport logic for example. Typically the result of an ALU operation isheld in an output register circuit 5070 which can forward the result toa variety of other processing functions. There are many arrangements ofprocessor units, the present description is only intended to provide arepresentative understanding of one embodiment.

An ADD instruction for example would be executed in an execution unit5057 having arithmetic and logical functionality while a floating pointinstruction for example would be executed in a floating point executionhaving specialized floating point capability. Preferably, an executionunit operates on operands identified by an instruction by performing anopcode defined function on the operands. For example, an ADD instructionmay be executed by an execution unit 5057 on operands found in tworegisters 5059 identified by register fields of the instruction.

The execution unit 5057 performs the arithmetic addition on two operandsand stores the result in a third operand where the third operand may bea third register or one of the two source registers. The execution unitpreferably utilizes an Arithmetic Logic Unit (ALU) 5066 that is capableof performing a variety of logical functions such as Shift, Rotate, And,Or and XOR as well as a variety of algebraic functions including any ofadd, subtract, multiply, divide. Some ALUs 5066 are designed for scalaroperations and some for floating point. Data may be Big Endian (wherethe least significant byte is at the highest byte address) or LittleEndian (where the least significant byte is at the lowest byte address)depending on architecture. The IBM z/Architecture® is Big Endian. Signedfields may be sign and magnitude, 1's complement or 2's complementdepending on architecture. A 2's complement number is advantageous inthat the ALU does not need to design a subtract capability since eithera negative value or a positive value in 2's complement requires only anaddition within the ALU. Numbers are commonly described in shorthand,where a 12 bit field defines an address of a 4,096 byte block and iscommonly described as a 4 Kbyte (Kilo-byte) block, for example.

Referring to FIG. 15B, branch instruction information for executing abranch instruction is typically sent to a branch unit 5058 which oftenemploys a branch prediction algorithm such as a branch history table5082 to predict the outcome of the branch before other conditionaloperations are complete. The target of the current branch instructionwill be fetched and speculatively executed before the conditionaloperations are complete. When the conditional operations are completedthe speculatively executed branch instructions are either completed ordiscarded based on the conditions of the conditional operation and thespeculated outcome. A typical branch instruction may test conditioncodes and branch to a target address if the condition codes meet thebranch requirement of the branch instruction, a target address may becalculated based on several numbers including ones found in registerfields or an immediate field of the instruction for example. The branchunit 5058 may employ an ALU 5074 having a plurality of input registercircuits 5075, 5076, 5077 and an output register circuit 5080. Thebranch unit 5058 may communicate with general registers 5059, decodedispatch unit 5056 or other circuits 5073, for example.

The execution of a group of instructions can be interrupted for avariety of reasons including a context switch initiated by an operatingsystem, a program exception or error causing a context switch, an I/Ointerruption signal causing a context switch or multi-threading activityof a plurality of programs (in a multi-threaded environment), forexample. Preferably a context switch action saves state informationabout a currently executing program and then loads state informationabout another program being invoked. State information may be saved inhardware registers or in memory for example. State informationpreferably comprises a program counter value pointing to a nextinstruction to be executed, condition codes, memory translationinformation and architected register content. A context switch activitycan be exercised by hardware circuits, application programs, operatingsystem programs or firmware code (microcode, pico-code or licensedinternal code (LIC)) alone or in combination.

A processor accesses operands according to instruction defined methods.The instruction may provide an immediate operand using the value of aportion of the instruction, may provide one or more register fieldsexplicitly pointing to either general purpose registers or specialpurpose registers (floating point registers for example). Theinstruction may utilize implied registers identified by an opcode fieldas operands. The instruction may utilize memory locations for operands.A memory location of an operand may be provided by a register, animmediate field, or a combination of registers and immediate field asexemplified by the z/Architecture® long displacement facility whereinthe instruction defines a base register, an index register and animmediate field (displacement field) that are added together to providethe address of the operand in memory for example. Location hereintypically implies a location in main memory (main storage) unlessotherwise indicated.

Referring to FIG. 16C, a processor accesses storage using a load/storeunit 5060. The load/store unit 5060 may perform a load operation byobtaining the address of the target operand in memory 5053 and loadingthe operand in a register 5059 or another memory 5053 location, or mayperform a store operation by obtaining the address of the target operandin memory 5053 and storing data obtained from a register 5059 or anothermemory 5053 location in the target operand location in memory 5053. Theload/store unit 5060 may be speculative and may access memory in asequence that is out-of-order relative to instruction sequence, howeverthe load/store unit 5060 is to maintain the appearance to programs thatinstructions were executed in order. A load/store unit 5060 maycommunicate with general registers 5059, decode/dispatch unit 5056,cache/memory interface 5053 or other elements 5083 and comprises variousregister circuits, ALUs 5085 and control logic 5090 to calculate storageaddresses and to provide pipeline sequencing to keep operationsin-order. Some operations may be out of order but the load/store unitprovides functionality to make the out of order operations to appear tothe program as having been performed in order, as is well known in theart.

Preferably addresses that an application program “sees” are oftenreferred to as virtual addresses. Virtual addresses are sometimesreferred to as “logical addresses” and “effective addresses”. Thesevirtual addresses are virtual in that they are redirected to physicalmemory location by one of a variety of dynamic address translation (DAT)technologies including, but not limited to, simply prefixing a virtualaddress with an offset value, translating the virtual address via one ormore translation tables, the translation tables preferably comprising atleast a segment table and a page table alone or in combination,preferably, the segment table having an entry pointing to the pagetable. In the z/Architecture®, a hierarchy of translation is providedincluding a region first table, a region second table, a region thirdtable, a segment table and an optional page table. The performance ofthe address translation is often improved by utilizing a translationlookaside buffer (TLB) which comprises entries mapping a virtual addressto an associated physical memory location. The entries are created whenthe DAT translates a virtual address using the translation tables.Subsequent use of the virtual address can then utilize the entry of thefast TLB rather than the slow sequential translation table accesses. TLBcontent may be managed by a variety of replacement algorithms includingLRU (Least Recently used).

In the case where the processor is a processor of a multi-processorsystem, each processor has responsibility to keep shared resources, suchas I/O, caches, TLBs and memory, interlocked for coherency. Typically,“snoop” technologies will be utilized in maintaining cache coherency. Ina snoop environment, each cache line may be marked as being in any oneof a shared state, an exclusive state, a changed state, an invalid stateand the like in order to facilitate sharing.

I/O units 5054 (FIG. 14) provide the processor with means for attachingto peripheral devices including tape, disc, printers, displays, andnetworks for example. I/O units are often presented to the computerprogram by software drivers. In mainframes, such as the System z® fromIBM®, channel adapters and open system adapters are I/O units of themainframe that provide the communications between the operating systemand peripheral devices.

Further, other types of computing environments can benefit from one ormore aspects of the present invention. As an example, an environment mayinclude an emulator (e.g., software or other emulation mechanisms), inwhich a particular architecture (including, for instance, instructionexecution, architected functions, such as address translation, andarchitected registers) or a subset thereof is emulated (e.g., on anative computer system having a processor and memory). In such anenvironment, one or more emulation functions of the emulator canimplement one or more aspects of the present invention, even though acomputer executing the emulator may have a different architecture thanthe capabilities being emulated. As one example, in emulation mode, thespecific instruction or operation being emulated is decoded, and anappropriate emulation function is built to implement the individualinstruction or operation.

In an emulation environment, a host computer includes, for instance, amemory to store instructions and data; an instruction fetch unit tofetch instructions from memory and to optionally, provide localbuffering for the fetched instruction; an instruction decode unit toreceive the fetched instructions and to determine the type ofinstructions that have been fetched; and an instruction execution unitto execute the instructions. Execution may include loading data into aregister from memory; storing data back to memory from a register; orperforming some type of arithmetic or logical operation, as determinedby the decode unit. In one example, each unit is implemented insoftware. For instance, the operations being performed by the units areimplemented as one or more subroutines within emulator software.

More particularly, in a mainframe, architected machine instructions areused by programmers, usually today “C” programmers, often by way of acompiler application. These instructions stored in the storage mediummay be executed natively in a z/Architecture® IBM® Server, oralternatively in machines executing other architectures. They can beemulated in the existing and in future IBM® mainframe servers and onother machines of IBM® (e.g., Power Systems servers and System x®Servers). They can be executed in machines running Linux on a widevariety of machines using hardware manufactured by IBM®, Intel®, AMD™,and others. Besides execution on that hardware under a z/Architecture®,Linux can be used as well as machines which use emulation by Hercules,UMX, or FSI (Fundamental Software, Inc), where generally execution is inan emulation mode. In emulation mode, emulation software is executed bya native processor to emulate the architecture of an emulated processor.

The native processor typically executes emulation software comprisingeither firmware or a native operating system to perform emulation of theemulated processor. The emulation software is responsible for fetchingand executing instructions of the emulated processor architecture. Theemulation software maintains an emulated program counter to keep trackof instruction boundaries. The emulation software may fetch one or moreemulated machine instructions at a time and convert the one or moreemulated machine instructions to a corresponding group of native machineinstructions for execution by the native processor. These convertedinstructions may be cached such that a faster conversion can beaccomplished. Notwithstanding, the emulation software is to maintain thearchitecture rules of the emulated processor architecture so as toassure operating systems and applications written for the emulatedprocessor operate correctly. Furthermore, the emulation software is toprovide resources identified by the emulated processor architectureincluding, but not limited to, control registers, general purposeregisters, floating point registers, dynamic address translationfunction including segment tables and page tables for example, interruptmechanisms, context switch mechanisms, Time of Day (TOD) clocks andarchitected interfaces to I/O subsystems such that an operating systemor an application program designed to run on the emulated processor, canbe run on the native processor having the emulation software.

A specific instruction being emulated is decoded, and a subroutine iscalled to perform the function of the individual instruction. Anemulation software function emulating a function of an emulatedprocessor is implemented, for example, in a “C” subroutine or driver, orsome other method of providing a driver for the specific hardware aswill be within the skill of those in the art after understanding thedescription of the preferred embodiment. Various software and hardwareemulation patents including, but not limited to U.S. Pat. No. 5,551,013,entitled “Multiprocessor for Hardware Emulation”, by Beausoleil et al.;and U.S. Pat. No. 6,009,261, entitled “Preprocessing of Stored TargetRoutines for Emulating Incompatible Instructions on a Target Processor”,by Scalzi et al; and U.S. Pat. No. 5,574,873, entitled “Decoding GuestInstruction to Directly Access Emulation Routines that Emulate the GuestInstructions”, by Davidian et al; and U.S. Pat. No. 6,308,255, entitled“Symmetrical Multiprocessing Bus and Chipset Used for CoprocessorSupport Allowing Non-Native Code to Run in a System”, by Gorishek et al;and U.S. Letters Patent No. 6,463,582, entitled “Dynamic OptimizingObject Code Translator for Architecture Emulation and Dynamic OptimizingObject Code Translation Method”, by Lethin et al; and U.S. Pat. No.5,790,825, entitled “Method for Emulating Guest Instructions on a HostComputer Through Dynamic Recompilation of Host Instructions”, by EricTraut, each of which is hereby incorporated herein by reference in itsentirety; and many others, illustrate a variety of known ways to achieveemulation of an instruction format architected for a different machinefor a target machine available to those skilled in the art.

In FIG. 16, an example of an emulated host computer system 5092 isprovided that emulates a host computer system 5000′ of a hostarchitecture. In the emulated host computer system 5092, the hostprocessor (CPU) 5091 is an emulated host processor (or virtual hostprocessor) and comprises an emulation processor 5093 having a differentnative instruction set architecture than that of the processor 5091 ofthe host computer 5000′. The emulated host computer system 5092 hasmemory 5094 accessible to the emulation processor 5093. In the exampleembodiment, the memory 5094 is partitioned into a host computer memory5096 portion and an emulation routines 5097 portion. The host computermemory 5096 is available to programs of the emulated host computer 5092according to host computer architecture. The emulation processor 5093executes native instructions of an architected instruction set of anarchitecture other than that of the emulated processor 5091, the nativeinstructions obtained from emulation routines memory 5097, and mayaccess a host instruction for execution from a program in host computermemory 5096 by employing one or more instruction(s) obtained in asequence & access/decode routine which may decode the hostinstruction(s) accessed to determine a native instruction executionroutine for emulating the function of the host instruction accessed.Other facilities that are defined for the host computer system 5000′architecture may be emulated by architected facilities routines,including such facilities as general purpose registers, controlregisters, dynamic address translation and I/O subsystem support andprocessor cache, for example. The emulation routines may also takeadvantage of functions available in the emulation processor 5093 (suchas general registers and dynamic translation of virtual addresses) toimprove performance of the emulation routines. Special hardware andoff-load engines may also be provided to assist the processor 5093 inemulating the function of the host computer 5000′.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising”, when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below, if any, areintended to include any structure, material, or act for performing thefunction in combination with other claimed elements as specificallyclaimed. The description of the present invention has been presented forpurposes of illustration and description, but is not intended to beexhaustive or limited to the invention in the form disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the invention.The embodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiment with various modifications as are suited to theparticular use contemplated.

What is claimed is:
 1. A computer program product for executing a Start Subchannel instruction in a computing environment comprising main storage and storage class memory, said computer program product comprising: a non-transitory computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising: based on determining that a subchannel identified by the Start Subchannel instruction is an Asynchronous Data Mover (ADM) subchannel, performing: obtaining an operation request block from main storage, the operation request block comprising an address of an operation block; based on the address of the operation block, obtaining the operation block from main storage, the operation block consisting of a request block, a response block, and one or more move specification blocks (MSBs), wherein the request block comprises an MSB count field having a value indicating a number of MSBs associated with a request associated with the operation request block, wherein the response block is configured to hold exception conditions, wherein each move specification block is configured to include an operation code field, a block count field, a main storage address field, a storage class memory address field, a block size field and a flags field; for each MSB block of the operation block, obtaining a move specification block of the one or more move specification blocks, and: determining based on the flags field that the obtained move specification block is configured to obtain a list of one or more indirect data address words, and wherein an address of a first indirect data address word of the list of one or more indirect data address words is located at a first main storage address of the main storage address field of the obtained MSB; for each block of data specified by the obtained MSB, obtaining from the list of one or more indirect data address words a second main storage address, wherein a number of blocks and a block size are determined based on the block count field and the block size field of the obtained MSB; determining based on an operation code of the operation code field in the obtained move specification block that the obtained move specification block is configured to move blocks of data; and based on the obtained move specification block, moving each block of data between the main storage and the storage class memory, wherein an address of a main storage location used for the move of a block of data is obtained using a respective second main storage address and an address of the storage class memory used for the move is obtained using the storage class memory address field.
 2. The computer program product of claim 1, wherein a number of indirect data address words in the list is a sum of a number specified by the block count field and a number of indirect data address words that specify a branch to next indirect data address word, the branch to next indirect data address word specified in the flags field.
 3. The computer program product of claim 1, wherein based on the operation code in the operation code field of the obtained move specification block being set to a first value, the operation code designates a read operation and the moving comprises moving each block of data from storage class memory to main storage.
 4. The computer program product of claim 1, wherein based on the operation code in the operation code field of the obtained move specification block being set to a second value, the operation code designates a write operation, and the moving comprises moving each block of data from main storage to storage class memory.
 5. The computer program product of claim 1, wherein the size designated in the block size field of the obtained move specification block is either 4K-bytes or 1M-bytes.
 6. The computer program product of claim 1, wherein the method further comprises generating one or more status conditions, based on completion of the moving, the one or more status conditions accessible to an issuer of the Start Subchannel instruction.
 7. The computer program product of claim 1, wherein the response block is populated based on an error condition detected during execution of the move operation.
 8. A computer system for executing a Start Subchannel instruction in a computing environment comprising main storage and storage class memory, said computer system comprising: a memory; and a processor in communications with the memory, wherein the computer system is configured to perform a method, said method comprising: based on determining that a subchannel identified by the Start Subchannel instruction is an Asynchronous Data Mover (ADM) subchannel, performing: obtaining an operation request block from main storage, the operation request block comprising an address of an operation block; based on the address of the operation block, obtaining the operation block from main storage, the operation block consisting of a request block, a response block, and one or more move specification blocks (MSBs), wherein the request block comprises an MSB count field having a value indicating a number of MSBs associated with a request associated with the operation request block, wherein the response block is configured to hold exception conditions, wherein each move specification block is configured to include an operation code field, a block count field, a main storage address field, a storage class memory address field, a block size field and a flags field; for each MSB block of the operation block, obtaining a move specification block of the one or more move specification blocks, and: determining based on the flags field that the obtained move specification block is configured to obtain a list of one or more indirect data address words, and wherein an address of a first indirect data address word of the list of one or more indirect data address words is located at a first main storage address of the main storage address field of the obtained MSB; for each block of data specified by the obtained MSB, obtaining from the list of one or more indirect data address words a second main storage address, wherein a number of blocks and a block size are determined based on the block count field and the block size field of the obtained MSB; determining based on an operation code of the operation code field in the obtained move specification block that the obtained move specification block is configured to move blocks of data; and based on the obtained move specification block, moving each block of data between the main storage and the storage class memory, wherein an address of a main storage location used for the move of a block of data is obtained using a respective second main storage address and an address of the storage class memory used for the move is obtained using the storage class memory address field.
 9. The computer system of claim 8, wherein a number of indirect data address words in the list is a sum of a number specified by the block count field and a number of indirect data address words that specify a branch to next indirect data address word, the branch to next indirect data address word specified in the flags field.
 10. The computer system of claim 9, wherein based on the operation code in the operation code field of the obtained move specification block being set to a second value, the operation code designates a write operation, and the moving comprises moving each block of data from main storage to storage class memory.
 11. The computer system of claim 8, wherein based on the operation code in the operation code field of the obtained move specification block being set to a first value, the operation code designates a read operation and the moving comprises moving each block of data from storage class memory to main storage.
 12. The computer system of claim 8, wherein the size designated in the block size field of the obtained move specification block is either 4K-bytes or 1M-bytes.
 13. The computer system of claim 8, wherein the method further comprises generating one or more status conditions, based on completion of the moving, the one or more status conditions accessible to an issuer of the Start Subchannel instruction.
 14. The computer system of claim 8, wherein the response block is populated based on an error condition detected during execution of the move operation. 